debian-mirror-gitlab/.haml-lint.yml

182 lines
3.7 KiB
YAML
Raw Normal View History

2019-09-04 21:01:54 +05:30
inherits_from:
- .haml-lint_todo.yml
2019-05-05 18:10:48 +05:30
# Whether to ignore frontmatter at the beginning of HAML documents for
# frameworks such as Jekyll/Middleman
skip_frontmatter: false
exclude:
- 'vendor/**/*'
- 'spec/**/*'
2021-12-11 22:18:48 +05:30
- 'ee/spec/**/*'
2019-09-04 21:01:54 +05:30
require:
2020-07-28 23:09:34 +05:30
- './haml_lint/linter/documentation_links.rb'
2022-07-16 23:28:13 +05:30
- './haml_lint/linter/inline_javascript.rb'
- './haml_lint/linter/no_plain_nodes.rb'
2019-05-05 18:10:48 +05:30
linters:
AltText:
enabled: true
ClassAttributeWithStaticValue:
enabled: true
ClassesBeforeIds:
enabled: false
ConsecutiveComments:
enabled: false
ConsecutiveSilentScripts:
enabled: false
max_consecutive: 2
2020-07-28 23:09:34 +05:30
DocumentationLinks:
enabled: true
include:
- 'app/views/**/*.haml'
- 'ee/app/views/**/*.haml'
2019-05-05 18:10:48 +05:30
EmptyObjectReference:
enabled: true
EmptyScript:
enabled: true
FinalNewline:
enabled: true
present: true
HtmlAttributes:
enabled: true
IdNames:
enabled: false
ImplicitDiv:
enabled: true
InlineJavaScript:
enabled: true
InlineStyles:
enabled: false
InstanceVariables:
enabled: false
LeadingCommentSpace:
enabled: false
LineLength:
enabled: false
max: 80
MultilinePipe:
enabled: true
MultilineScript:
enabled: true
ObjectReferenceAttributes:
enabled: true
RepeatedId:
enabled: false
RuboCop:
enabled: true
ignored_cops:
2022-07-23 23:45:48 +05:30
# These cops are incredibly noisy when it comes to HAML templates, so we
# ignore them.
2019-05-05 18:10:48 +05:30
- Layout/BlockAlignment
- Layout/EndAlignment
2020-06-23 00:09:42 +05:30
- Layout/LineLength
2019-05-05 18:10:48 +05:30
- 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
2022-07-23 23:45:48 +05:30
- Cop/StaticTranslationDefinition
2019-05-05 18:10:48 +05:30
# These cops should eventually get enabled
- Cop/LineBreakAfterGuardClauses
- Cop/ProjectPathHelper
2021-04-29 21:17:54 +05:30
- Gitlab/FeatureAvailableUsage
2019-05-05 18:10:48 +05:30
- GitlabSecurity/PublicSend
2019-07-31 22:56:46 +05:30
- Layout/EmptyLineAfterGuardClause
2019-05-05 18:10:48 +05:30
- Layout/LeadingCommentSpace
- Layout/SpaceAroundOperators
- Layout/SpaceBeforeComma
- Layout/SpaceBeforeFirstArg
- Layout/SpaceInsideHashLiteralBraces
- Layout/SpaceInsideStringInterpolation
2020-06-23 00:09:42 +05:30
- Layout/TrailingEmptyLines
2019-05-05 18:10:48 +05:30
- Lint/LiteralInInterpolation
- Lint/ParenthesesAsGroupedExpression
2019-07-31 22:56:46 +05:30
- Lint/SafeNavigationConsistency
2019-05-05 18:10:48 +05:30
- Metrics/BlockNesting
- Naming/VariableName
- Performance/RedundantMatch
- Performance/StringReplacement
2019-07-31 22:56:46 +05:30
- Rails/LinkToBlank
2019-05-05 18:10:48 +05:30
- Rails/RequestReferer
- Style/ColonMethodCall
- Style/ConditionalAssignment
2022-08-27 11:52:29 +05:30
- Style/FormatString
2019-05-05 18:10:48 +05:30
- Style/HashSyntax
2022-08-27 11:52:29 +05:30
- Style/IfInsideElse
2019-05-05 18:10:48 +05:30
- Style/IdenticalConditionalBranches
- Style/NegatedIf
- Style/NestedTernaryOperator
2022-08-27 11:52:29 +05:30
- Style/RedundantInterpolation
2019-05-05 18:10:48 +05:30
- Style/SelfAssignment
2022-08-27 11:52:29 +05:30
- Style/StringConcatenation
2019-05-05 18:10:48 +05:30
- Style/TernaryParentheses
- Style/TrailingCommaInHashLiteral
- Style/UnlessElse
2019-07-31 22:56:46 +05:30
- Style/UnneededCondition
2019-05-05 18:10:48 +05:30
- Style/WordArray
- Style/ZeroLengthPredicate
2021-04-29 21:17:54 +05:30
# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/207950
- Cop/UserAdmin
2019-05-05 18:10:48 +05:30
RubyComments:
enabled: true
SpaceBeforeScript:
enabled: true
SpaceInsideHashAttributes:
enabled: true
style: space
2019-10-12 21:52:04 +05:30
Syntax:
enabled: true
2019-05-05 18:10:48 +05:30
Indentation:
enabled: true
2019-09-04 21:01:54 +05:30
character: space # or tab
2019-05-05 18:10:48 +05:30
TagName:
enabled: true
TrailingWhitespace:
enabled: true
UnnecessaryInterpolation:
enabled: true
UnnecessaryStringOutput:
enabled: true
ViewLength:
enabled: false