Order cops alphabetically
This commit is contained in:
parent
87c9df29ce
commit
2afb65468d
252
.rubocop.yml
252
.rubocop.yml
|
@ -24,6 +24,9 @@ AllCops:
|
||||||
- 'bin/**/*'
|
- 'bin/**/*'
|
||||||
- 'generator_templates/**/*'
|
- 'generator_templates/**/*'
|
||||||
|
|
||||||
|
Bundler/OrderedGems:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Style #######################################################################
|
# Style #######################################################################
|
||||||
|
|
||||||
# Check indentation of private/protected visibility modifiers.
|
# Check indentation of private/protected visibility modifiers.
|
||||||
|
@ -47,6 +50,9 @@ Style/AlignArray:
|
||||||
Style/AlignHash:
|
Style/AlignHash:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/AlignParameters:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Whether `and` and `or` are banned only in conditionals (conditionals)
|
# Whether `and` and `or` are banned only in conditionals (conditionals)
|
||||||
# or completely (always).
|
# or completely (always).
|
||||||
Style/AndOr:
|
Style/AndOr:
|
||||||
|
@ -68,6 +74,9 @@ Style/AsciiIdentifiers:
|
||||||
Style/Attr:
|
Style/Attr:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/BarePercentLiterals:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
# Avoid the use of BEGIN blocks.
|
# Avoid the use of BEGIN blocks.
|
||||||
Style/BeginBlock:
|
Style/BeginBlock:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -76,15 +85,21 @@ Style/BeginBlock:
|
||||||
Style/BlockComments:
|
Style/BlockComments:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
# Put end statement of multiline block on its own line.
|
|
||||||
Style/BlockEndNewline:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
# Avoid using {...} for multi-line blocks (multiline chaining is # always
|
# Avoid using {...} for multi-line blocks (multiline chaining is # always
|
||||||
# ugly). Prefer {...} over do...end for single-line blocks.
|
# ugly). Prefer {...} over do...end for single-line blocks.
|
||||||
Style/BlockDelimiters:
|
Style/BlockDelimiters:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
# Put end statement of multiline block on its own line.
|
||||||
|
Style/BlockEndNewline:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Style/BracesAroundHashParameters:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Style/CaseEquality:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Indentation of when in a case/when/[else/]end.
|
# Indentation of when in a case/when/[else/]end.
|
||||||
Style/CaseIndentation:
|
Style/CaseIndentation:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -113,10 +128,19 @@ Style/ClassMethods:
|
||||||
Style/ClassVars:
|
Style/ClassVars:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/ColonMethodCall:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Style/CommentAnnotation:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Indentation of comments.
|
# Indentation of comments.
|
||||||
Style/CommentIndentation:
|
Style/CommentIndentation:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/ConditionalAssignment:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
# Constants should use SCREAMING_SNAKE_CASE.
|
# Constants should use SCREAMING_SNAKE_CASE.
|
||||||
Style/ConstantName:
|
Style/ConstantName:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -133,6 +157,9 @@ Style/DotPosition:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
EnforcedStyle: leading
|
EnforcedStyle: leading
|
||||||
|
|
||||||
|
Style/DoubleNegation:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Align elses and elsifs correctly.
|
# Align elses and elsifs correctly.
|
||||||
Style/ElseAlignment:
|
Style/ElseAlignment:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -157,14 +184,14 @@ Style/EmptyLinesAroundBlockBody:
|
||||||
Style/EmptyLinesAroundClassBody:
|
Style/EmptyLinesAroundClassBody:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
# Keeps track of empty lines around module bodies.
|
|
||||||
Style/EmptyLinesAroundModuleBody:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
# Keeps track of empty lines around method bodies.
|
# Keeps track of empty lines around method bodies.
|
||||||
Style/EmptyLinesAroundMethodBody:
|
Style/EmptyLinesAroundMethodBody:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
# Keeps track of empty lines around module bodies.
|
||||||
|
Style/EmptyLinesAroundModuleBody:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
# Avoid the use of END blocks.
|
# Avoid the use of END blocks.
|
||||||
Style/EndBlock:
|
Style/EndBlock:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -210,15 +237,15 @@ Style/GlobalVars:
|
||||||
Style/HashSyntax:
|
Style/HashSyntax:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
# Do not use if x; .... Use the ternary operator instead.
|
|
||||||
Style/IfWithSemicolon:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
# Checks that conditional statements do not have an identical line at the
|
# Checks that conditional statements do not have an identical line at the
|
||||||
# end of each branch, which can validly be moved out of the conditional.
|
# end of each branch, which can validly be moved out of the conditional.
|
||||||
Style/IdenticalConditionalBranches:
|
Style/IdenticalConditionalBranches:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
# Do not use if x; .... Use the ternary operator instead.
|
||||||
|
Style/IfWithSemicolon:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
# Checks the indentation of the first line of the right-hand-side of a
|
# Checks the indentation of the first line of the right-hand-side of a
|
||||||
# multi-line assignment.
|
# multi-line assignment.
|
||||||
Style/IndentAssignment:
|
Style/IndentAssignment:
|
||||||
|
@ -497,6 +524,9 @@ Metrics/AbcSize:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Max: 60
|
Max: 60
|
||||||
|
|
||||||
|
Metrics/BlockLength:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Avoid excessive block nesting.
|
# Avoid excessive block nesting.
|
||||||
Metrics/BlockNesting:
|
Metrics/BlockNesting:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -536,20 +566,17 @@ Metrics/PerceivedComplexity:
|
||||||
|
|
||||||
# Lint ########################################################################
|
# Lint ########################################################################
|
||||||
|
|
||||||
# Checks for useless access modifiers.
|
|
||||||
Lint/UselessAccessModifier:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
# Checks for attempts to use `private` or `protected` to set the visibility
|
|
||||||
# of a class method, which does not work.
|
|
||||||
Lint/IneffectiveAccessModifier:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Checks for ambiguous operators in the first argument of a method invocation
|
# Checks for ambiguous operators in the first argument of a method invocation
|
||||||
# without parentheses.
|
# without parentheses.
|
||||||
Lint/AmbiguousOperator:
|
Lint/AmbiguousOperator:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Lint/AmbiguousRegexpLiteral:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Lint/AssignmentInCondition:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Align block ends correctly.
|
# Align block ends correctly.
|
||||||
Lint/BlockAlignment:
|
Lint/BlockAlignment:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -615,11 +642,19 @@ Lint/FloatOutOfRange:
|
||||||
Lint/FormatParameterMismatch:
|
Lint/FormatParameterMismatch:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Lint/HandleExceptions:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Checks for adjacent string literals on the same line, which could better be
|
# Checks for adjacent string literals on the same line, which could better be
|
||||||
# represented as a single string literal.
|
# represented as a single string literal.
|
||||||
Lint/ImplicitStringConcatenation:
|
Lint/ImplicitStringConcatenation:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
# Checks for attempts to use `private` or `protected` to set the visibility
|
||||||
|
# of a class method, which does not work.
|
||||||
|
Lint/IneffectiveAccessModifier:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Checks for invalid character literals with a non-escaped whitespace
|
# Checks for invalid character literals with a non-escaped whitespace
|
||||||
# character.
|
# character.
|
||||||
Lint/InvalidCharacterLiteral:
|
Lint/InvalidCharacterLiteral:
|
||||||
|
@ -633,6 +668,9 @@ Lint/LiteralInCondition:
|
||||||
Lint/LiteralInInterpolation:
|
Lint/LiteralInInterpolation:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Lint/Loop:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Do not use nested method definitions.
|
# Do not use nested method definitions.
|
||||||
Lint/NestedMethodDefinition:
|
Lint/NestedMethodDefinition:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -662,6 +700,9 @@ Lint/RescueException:
|
||||||
Lint/ShadowedException:
|
Lint/ShadowedException:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
Lint/ShadowingOuterLocalVariable:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Checks for Object#to_s usage in string interpolation.
|
# Checks for Object#to_s usage in string interpolation.
|
||||||
Lint/StringConversionInInterpolation:
|
Lint/StringConversionInInterpolation:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -670,19 +711,32 @@ Lint/StringConversionInInterpolation:
|
||||||
Lint/UnderscorePrefixedVariableName:
|
Lint/UnderscorePrefixedVariableName:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Lint/UnifiedInteger:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
# Checks for rubocop:disable comments that can be removed.
|
# Checks for rubocop:disable comments that can be removed.
|
||||||
# Note: this cop is not disabled when disabling all cops.
|
# Note: this cop is not disabled when disabling all cops.
|
||||||
# It must be explicitly disabled.
|
# It must be explicitly disabled.
|
||||||
Lint/UnneededDisable:
|
Lint/UnneededDisable:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
Lint/UnneededSplatExpansion:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Unreachable code.
|
# Unreachable code.
|
||||||
Lint/UnreachableCode:
|
Lint/UnreachableCode:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Lint/UnusedBlockArgument:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
Lint/UnusedMethodArgument:
|
Lint/UnusedMethodArgument:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
# Checks for useless access modifiers.
|
||||||
|
Lint/UselessAccessModifier:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
# Checks for useless assignment to a local variable.
|
# Checks for useless assignment to a local variable.
|
||||||
Lint/UselessAssignment:
|
Lint/UselessAssignment:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -722,6 +776,16 @@ Performance/LstripRstrip:
|
||||||
Performance/RangeInclude:
|
Performance/RangeInclude:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Performance/RedundantBlockCall:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Performance/RedundantMatch:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Performance/RedundantMerge:
|
||||||
|
Enabled: true
|
||||||
|
MaxKeyValuePairs: 1
|
||||||
|
|
||||||
# Use `sort` instead of `sort_by { |x| x }`.
|
# Use `sort` instead of `sort_by { |x| x }`.
|
||||||
Performance/RedundantSortBy:
|
Performance/RedundantSortBy:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -741,6 +805,11 @@ Performance/StringReplacement:
|
||||||
Performance/TimesMap:
|
Performance/TimesMap:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
# Security ####################################################################
|
||||||
|
|
||||||
|
Security/JSONLoad:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
# Rails #######################################################################
|
# Rails #######################################################################
|
||||||
|
|
||||||
# Enables Rails cops.
|
# Enables Rails cops.
|
||||||
|
@ -761,6 +830,15 @@ Rails/Date:
|
||||||
Rails/Delegate:
|
Rails/Delegate:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Rails/DynamicFindBy:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Rails/Exit:
|
||||||
|
Enabled: true
|
||||||
|
Exclude:
|
||||||
|
- lib/gitlab/upgrader.rb
|
||||||
|
- 'lib/backup/**/*'
|
||||||
|
|
||||||
# Prefer `find_by` over `where.first`.
|
# Prefer `find_by` over `where.first`.
|
||||||
Rails/FindBy:
|
Rails/FindBy:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -773,6 +851,9 @@ Rails/FindEach:
|
||||||
Rails/HasAndBelongsToMany:
|
Rails/HasAndBelongsToMany:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Rails/HttpPositionalArguments:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Checks for calls to puts, print, etc.
|
# Checks for calls to puts, print, etc.
|
||||||
Rails/Output:
|
Rails/Output:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -782,6 +863,9 @@ Rails/Output:
|
||||||
- 'lib/backup/**/*'
|
- 'lib/backup/**/*'
|
||||||
- 'lib/tasks/**/*'
|
- 'lib/tasks/**/*'
|
||||||
|
|
||||||
|
Rails/OutputSafety:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Checks for incorrect grammar when using methods like `3.day.ago`.
|
# Checks for incorrect grammar when using methods like `3.day.ago`.
|
||||||
Rails/PluralizationGrammar:
|
Rails/PluralizationGrammar:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -794,6 +878,12 @@ Rails/ReadWriteAttribute:
|
||||||
Rails/ScopeArgs:
|
Rails/ScopeArgs:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Rails/TimeZone:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Rails/Validation:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
# RSpec #######################################################################
|
# RSpec #######################################################################
|
||||||
|
|
||||||
# Check that instances are not being stubbed globally.
|
# Check that instances are not being stubbed globally.
|
||||||
|
@ -851,17 +941,20 @@ RSpec/Focus:
|
||||||
RSpec/InstanceVariable:
|
RSpec/InstanceVariable:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Checks for multiple top-level describes.
|
RSpec/LeadingSubject:
|
||||||
RSpec/MultipleDescribes:
|
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Enforces the usage of the same method on all negative message expectations.
|
RSpec/LetSetup:
|
||||||
RSpec/NotToNot:
|
Enabled: false
|
||||||
EnforcedStyle: not_to
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
# Prefer using verifying doubles over normal doubles.
|
RSpec/MessageChain:
|
||||||
RSpec/VerifiedDoubles:
|
Enabled: false
|
||||||
|
|
||||||
|
RSpec/MessageSpies:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Checks for multiple top-level describes.
|
||||||
|
RSpec/MultipleDescribes:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
RSpec/MultipleExpectations:
|
RSpec/MultipleExpectations:
|
||||||
|
@ -873,36 +966,10 @@ RSpec/NamedSubject:
|
||||||
RSpec/NestedGroups:
|
RSpec/NestedGroups:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
RSpec/LeadingSubject:
|
# Enforces the usage of the same method on all negative message expectations.
|
||||||
Enabled: false
|
RSpec/NotToNot:
|
||||||
|
EnforcedStyle: not_to
|
||||||
Lint/AmbiguousRegexpLiteral:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Bundler/OrderedGems:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Lint/HandleExceptions:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Lint/Loop:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Metrics/BlockLength:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Performance/RedundantMerge:
|
|
||||||
Enabled: true
|
Enabled: true
|
||||||
MaxKeyValuePairs: 1
|
|
||||||
|
|
||||||
RSpec/LetSetup:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
RSpec/MessageChain:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
RSpec/MessageSpies:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
RSpec/RepeatedDescription:
|
RSpec/RepeatedDescription:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
@ -910,71 +977,6 @@ RSpec/RepeatedDescription:
|
||||||
RSpec/SubjectStub:
|
RSpec/SubjectStub:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Lint/UnifiedInteger:
|
# Prefer using verifying doubles over normal doubles.
|
||||||
Enabled: true
|
RSpec/VerifiedDoubles:
|
||||||
|
|
||||||
Lint/ShadowingOuterLocalVariable:
|
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Lint/AssignmentInCondition:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Lint/UnneededSplatExpansion:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Lint/UnusedBlockArgument:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Performance/RedundantBlockCall:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Performance/RedundantMatch:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Rails/DynamicFindBy:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/HttpPositionalArguments:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/OutputSafety:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/TimeZone:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/Validation:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Security/JSONLoad:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/AlignParameters:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/BarePercentLiterals:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/BracesAroundHashParameters:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/CaseEquality:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/ColonMethodCall:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/CommentAnnotation:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/ConditionalAssignment:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Style/DoubleNegation:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Rails/Exit:
|
|
||||||
Enabled: true
|
|
||||||
Exclude:
|
|
||||||
- lib/gitlab/upgrader.rb
|
|
||||||
- 'lib/backup/**/*'
|
|
||||||
|
|
Loading…
Reference in New Issue