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