Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2afb6546
Commit
2afb6546
authored
Feb 22, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Order cops alphabetically
parent
87c9df29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
123 additions
and
121 deletions
+123
-121
.rubocop.yml
.rubocop.yml
+123
-121
No files found.
.rubocop.yml
View file @
2afb6546
...
@@ -24,6 +24,9 @@ AllCops:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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:
...
@@ -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,50 +941,9 @@ RSpec/Focus:
...
@@ -851,50 +941,9 @@ RSpec/Focus:
RSpec/InstanceVariable
:
RSpec/InstanceVariable
:
Enabled
:
false
Enabled
:
false
# Checks for multiple top-level describes.
RSpec/MultipleDescribes
:
Enabled
:
false
# Enforces the usage of the same method on all negative message expectations.
RSpec/NotToNot
:
EnforcedStyle
:
not_to
Enabled
:
true
# Prefer using verifying doubles over normal doubles.
RSpec/VerifiedDoubles
:
Enabled
:
false
RSpec/MultipleExpectations
:
Enabled
:
false
RSpec/NamedSubject
:
Enabled
:
false
RSpec/NestedGroups
:
Enabled
:
false
RSpec/LeadingSubject
:
RSpec/LeadingSubject
:
Enabled
:
false
Enabled
:
false
Lint/AmbiguousRegexpLiteral
:
Enabled
:
false
Bundler/OrderedGems
:
Enabled
:
false
Lint/HandleExceptions
:
Enabled
:
false
Lint/Loop
:
Enabled
:
false
Metrics/BlockLength
:
Enabled
:
false
Performance/RedundantMerge
:
Enabled
:
true
MaxKeyValuePairs
:
1
RSpec/LetSetup
:
RSpec/LetSetup
:
Enabled
:
false
Enabled
:
false
...
@@ -904,77 +953,30 @@ RSpec/MessageChain:
...
@@ -904,77 +953,30 @@ RSpec/MessageChain:
RSpec/MessageSpies
:
RSpec/MessageSpies
:
Enabled
:
false
Enabled
:
false
RSpec/RepeatedDescription
:
# Checks for multiple top-level describes.
Enabled
:
false
RSpec/MultipleDescribes
:
RSpec/SubjectStub
:
Enabled
:
false
Lint/UnifiedInteger
:
Enabled
:
true
Lint/ShadowingOuterLocalVariable
:
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
Enabled
:
false
R
ails/OutputSafety
:
R
Spec/MultipleExpectations
:
Enabled
:
false
Enabled
:
false
R
ails/TimeZone
:
R
Spec/NamedSubject
:
Enabled
:
false
Enabled
:
false
Rails/Validation
:
RSpec/NestedGroups
:
Enabled
:
true
Security/JSONLoad
:
Enabled
:
true
Style/AlignParameters
:
Enabled
:
false
Enabled
:
false
Style/BarePercentLiterals
:
# Enforces the usage of the same method on all negative message expectations.
RSpec/NotToNot
:
EnforcedStyle
:
not_to
Enabled
:
true
Enabled
:
true
Style/BracesAroundHashParameters
:
RSpec/RepeatedDescription
:
Enabled
:
false
Style/CaseEquality
:
Enabled
:
false
Enabled
:
false
Style/ColonMethodCall
:
RSpec/SubjectStub
:
Enabled
:
true
Style/CommentAnnotation
:
Enabled
:
false
Enabled
:
false
Style/ConditionalAssignment
:
# Prefer using verifying doubles over normal doubles.
Enabled
:
true
RSpec/VerifiedDoubles
:
Style/DoubleNegation
:
Enabled
:
false
Enabled
:
false
Rails/Exit
:
Enabled
:
true
Exclude
:
-
lib/gitlab/upgrader.rb
-
'
lib/backup/**/*'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment