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