summaryrefslogtreecommitdiff
path: root/.haml-lint.yml
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-08-16 14:15:54 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-08-25 18:43:21 +0200
commit08c0a1b8527287457cb8db5f41c368af192c606b (patch)
tree2534ee8c44c34213d4d82cb8aad0d61fa326b78f /.haml-lint.yml
parent842377ab3c5b80a3758ad8c36dc3358bd265bc10 (diff)
downloadgitlab-ce-08c0a1b8527287457cb8db5f41c368af192c606b.tar.gz
Reject ruby interpolation in externalized stringsbvl-correct-interpolation-i18n
When using ruby interpolation in externalized strings, they can't be detected. Which means they will never be presented to be translated. To mix variables into translations we need to use `sprintf` instead. Instead of: _("Hello #{subject}") Use: _("Hello %{subject}) % { subject: 'world' }
Diffstat (limited to '.haml-lint.yml')
-rw-r--r--.haml-lint.yml53
1 files changed, 50 insertions, 3 deletions
diff --git a/.haml-lint.yml b/.haml-lint.yml
index 32c7de0fb78..fcdc47af60f 100644
--- a/.haml-lint.yml
+++ b/.haml-lint.yml
@@ -70,14 +70,15 @@ linters:
enabled: false
RuboCop:
- enabled: false
+ enabled: true
# These cops are incredibly noisy when it comes to HAML templates, so we
# ignore them.
ignored_cops:
- - Lint/BlockAlignment
- - Lint/EndAlignment
+ - Layout/BlockAlignment
+ - Layout/EndAlignment
- Lint/Void
- Metrics/LineLength
+ - Naming/FileName
- Style/AlignParameters
- Style/BlockNesting
- Style/ElseAlignment
@@ -91,6 +92,52 @@ linters:
- Style/TrailingWhitespace
- Style/WhileUntilModifier
+ # These cops should eventually get enabled
+ - Cop/LineBreakAfterGuardClauses
+ - Cop/LineBreakAroundConditionalBlock
+ - Cop/ProjectPathHelper
+ - GitlabSecurity/PublicSend
+ - Layout/LeadingCommentSpace
+ - Layout/SpaceAfterColon
+ - Layout/SpaceAfterComma
+ - Layout/SpaceAroundOperators
+ - Layout/SpaceBeforeBlockBraces
+ - Layout/SpaceBeforeComma
+ - Layout/SpaceBeforeFirstArg
+ - Layout/SpaceInsideArrayLiteralBrackets
+ - Layout/SpaceInsideHashLiteralBraces
+ - Layout/SpaceInsideStringInterpolation
+ - Layout/TrailingBlankLines
+ - Lint/BooleanSymbol
+ - Lint/LiteralInInterpolation
+ - Lint/ParenthesesAsGroupedExpression
+ - Lint/RedundantWithIndex
+ - Lint/Syntax
+ - Lint/UselessAssignment
+ - Metrics/BlockNesting
+ - Naming/VariableName
+ - Performance/RedundantMatch
+ - Performance/StringReplacement
+ - Rails/Presence
+ - Rails/RequestReferer
+ - Style/AndOr
+ - Style/ColonMethodCall
+ - Style/ConditionalAssignment
+ - Style/HashSyntax
+ - Style/IdenticalConditionalBranches
+ - Style/NegatedIf
+ - Style/NestedTernaryOperator
+ - Style/Not
+ - Style/ParenthesesAroundCondition
+ - Style/RedundantParentheses
+ - Style/SelfAssignment
+ - Style/Semicolon
+ - Style/TernaryParentheses
+ - Style/TrailingCommaInHashLiteral
+ - Style/UnlessElse
+ - Style/WordArray
+ - Style/ZeroLengthPredicate
+
RubyComments:
enabled: true