gitlab-org--gitlab-foss/.haml-lint.yml

182 lines
3.7 KiB
YAML
Raw Normal View History

inherits_from:
- .haml-lint_todo.yml
# Whether to ignore frontmatter at the beginning of HAML documents for
# frameworks such as Jekyll/Middleman
skip_frontmatter: false
exclude:
- 'vendor/**/*'
- 'spec/**/*'
require:
- './haml_lint/linter/no_plain_nodes.rb'
- './haml_lint/linter/documentation_links.rb'
linters:
AltText:
2016-12-22 04:30:00 -05:00
enabled: true
ClassAttributeWithStaticValue:
enabled: true
ClassesBeforeIds:
enabled: false
ConsecutiveComments:
enabled: false
ConsecutiveSilentScripts:
enabled: false
max_consecutive: 2
DocumentationLinks:
enabled: true
include:
- 'app/views/**/*.haml'
- 'ee/app/views/**/*.haml'
EmptyObjectReference:
enabled: true
EmptyScript:
enabled: true
FinalNewline:
2016-12-22 06:43:11 -05:00
enabled: true
present: true
HtmlAttributes:
2016-12-22 07:21:27 -05:00
enabled: true
2017-08-07 05:08:15 -04:00
IdNames:
enabled: false
ImplicitDiv:
2016-12-23 04:32:07 -05:00
enabled: true
InlineJavaScript:
enabled: true
2017-08-07 05:08:15 -04:00
InlineStyles:
enabled: false
InstanceVariables:
enabled: false
LeadingCommentSpace:
enabled: false
LineLength:
enabled: false
max: 80
MultilinePipe:
2017-01-16 10:07:03 -05:00
enabled: true
MultilineScript:
enabled: true
ObjectReferenceAttributes:
enabled: true
2017-08-07 05:08:15 -04:00
RepeatedId:
enabled: false
RuboCop:
enabled: true
# These cops are incredibly noisy when it comes to HAML templates, so we
# ignore them.
ignored_cops:
- Layout/BlockAlignment
- Layout/EndAlignment
- Layout/LineLength
- Lint/Void
- Naming/FileName
- Style/AlignParameters
- Style/BlockNesting
- Style/ElseAlignment
- Style/FileName
- Style/FinalNewline
- Style/FrozenStringLiteralComment
- Style/IfUnlessModifier
- Style/IndentationWidth
- Style/Next
- Style/TrailingWhitespace
- Style/WhileUntilModifier
# These cops should eventually get enabled
2019-05-03 18:21:48 -04:00
- Cop/LineBreakAfterGuardClauses
- Cop/ProjectPathHelper
- Gitlab/FeatureAvailableUsage
- GitlabSecurity/PublicSend
2019-05-03 18:11:26 -04:00
- Layout/EmptyLineAfterGuardClause
- Layout/LeadingCommentSpace
- Layout/SpaceAroundOperators
- Layout/SpaceBeforeBlockBraces
- Layout/SpaceBeforeComma
- Layout/SpaceBeforeFirstArg
- Layout/SpaceInsideHashLiteralBraces
- Layout/SpaceInsideStringInterpolation
- Layout/TrailingEmptyLines
- Lint/BooleanSymbol
- Lint/LiteralInInterpolation
- Lint/ParenthesesAsGroupedExpression
- Lint/RedundantWithIndex
2019-05-03 18:21:48 -04:00
- Lint/SafeNavigationConsistency
- Metrics/BlockNesting
- Naming/VariableName
- Performance/RedundantMatch
- Performance/StringReplacement
2019-05-03 18:11:26 -04:00
- Rails/LinkToBlank
- Rails/Presence
- Rails/RequestReferer
- Style/ColonMethodCall
- Style/ConditionalAssignment
- Style/HashSyntax
- Style/IdenticalConditionalBranches
- Style/NegatedIf
- Style/NestedTernaryOperator
- Style/ParenthesesAroundCondition
- Style/RedundantParentheses
- Style/SelfAssignment
- Style/Semicolon
- Style/TernaryParentheses
- Style/TrailingCommaInHashLiteral
- Style/UnlessElse
2019-05-03 18:11:26 -04:00
- Style/UnneededCondition
- Style/WordArray
- Style/ZeroLengthPredicate
# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/207950
- Cop/UserAdmin
RubyComments:
2017-01-16 09:56:26 -05:00
enabled: true
SpaceBeforeScript:
enabled: true
SpaceInsideHashAttributes:
enabled: true
style: space
Syntax:
enabled: true
Indentation:
enabled: true
character: space # or tab
TagName:
enabled: true
TrailingWhitespace:
enabled: true
UnnecessaryInterpolation:
enabled: true
UnnecessaryStringOutput:
enabled: true
2017-08-07 05:08:15 -04:00
ViewLength:
enabled: false