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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
2c7439db
Commit
2c7439db
authored
May 25, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable multiple compatible Rubocop cops
Closes #17406
parent
fbef0cc9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
27 deletions
+43
-27
.rubocop.yml
.rubocop.yml
+42
-26
lib/ci/gitlab_ci_yaml_processor.rb
lib/ci/gitlab_ci_yaml_processor.rb
+1
-1
No files found.
.rubocop.yml
View file @
2c7439db
...
...
@@ -59,7 +59,7 @@ Style/AndOr:
# Use `Array#join` instead of `Array#*`.
Style/ArrayJoin
:
Enabled
:
fals
e
Enabled
:
tru
e
# Use only ascii symbols in comments.
Style/AsciiComments
:
...
...
@@ -71,7 +71,7 @@ Style/AsciiIdentifiers:
# Checks for uses of Module#attr.
Style/Attr
:
Enabled
:
fals
e
Enabled
:
tru
e
# Avoid the use of BEGIN blocks.
Style/BeginBlock
:
...
...
@@ -83,7 +83,7 @@ Style/BarePercentLiterals:
# Do not use block comments.
Style/BlockComments
:
Enabled
:
fals
e
Enabled
:
tru
e
# Put end statement of multiline block on its own line.
Style/BlockEndNewline
:
...
...
@@ -124,7 +124,7 @@ Style/ClassCheck:
# Use self when defining module/class methods.
Style/ClassMethods
:
Enabled
:
fals
e
Enabled
:
tru
e
# Avoid the use of class variables.
Style/ClassVars
:
...
...
@@ -218,7 +218,7 @@ Style/EmptyLiteral:
# Avoid the use of END blocks.
Style/EndBlock
:
Enabled
:
fals
e
Enabled
:
tru
e
# Use Unix-style line endings.
Style/EndOfLine
:
...
...
@@ -226,7 +226,7 @@ Style/EndOfLine:
# Favor the use of Fixnum#even? && Fixnum#odd?
Style/EvenOdd
:
Enabled
:
fals
e
Enabled
:
tru
e
# Do not use unnecessary spacing.
Style/ExtraSpacing
:
...
...
@@ -234,11 +234,16 @@ Style/ExtraSpacing:
# Use snake_case for source file names.
Style/FileName
:
Enabled
:
false
Enabled
:
true
# Checks for a line break before the first parameter in a multi-line method
# parameter definition.
Style/FirstMethodParameterLineBreak
:
Enabled
:
true
# Checks for flip flops.
Style/FlipFlop
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks use of for or each in multiline loops.
Style/For
:
...
...
@@ -250,7 +255,7 @@ Style/FormatString:
# Do not introduce global variables.
Style/GlobalVars
:
Enabled
:
fals
e
Enabled
:
tru
e
# Check for conditionals that can be replaced with guard clauses.
Style/GuardClause
:
...
...
@@ -271,7 +276,7 @@ Style/IfUnlessModifier:
# Do not use if x; .... Use the ternary operator instead.
Style/IfWithSemicolon
:
Enabled
:
fals
e
Enabled
:
tru
e
# 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.
...
...
@@ -309,7 +314,7 @@ Style/Lambda:
# Use lambda.call(...) instead of lambda.(...).
Style/LambdaCall
:
Enabled
:
fals
e
Enabled
:
tru
e
# Comments should start with a space.
Style/LeadingCommentSpace
:
...
...
@@ -329,7 +334,7 @@ Style/MethodDefParentheses:
# Use the configured style when naming methods.
Style/MethodName
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for usage of `extend self` in modules.
Style/ModuleFunction
:
...
...
@@ -370,6 +375,11 @@ Style/MultilineMethodCallBraceLayout:
Style/MultilineMethodCallIndentation
:
Enabled
:
false
# Checks that the closing brace in a method definition is symmetrical with
# respect to the opening brace and the method parameters.
Style/MultilineMethodDefinitionBraceLayout
:
Enabled
:
false
# Checks indentation of binary operations that span more than one line.
Style/MultilineOperationIndentation
:
Enabled
:
false
...
...
@@ -392,7 +402,7 @@ Style/NegatedWhile:
# Avoid using nested modifiers.
Style/NestedModifier
:
Enabled
:
fals
e
Enabled
:
tru
e
# Parenthesize method calls which are nested inside the argument list of
# another parenthesized method call.
...
...
@@ -429,7 +439,7 @@ Style/OneLineConditional:
# When defining binary operators, name the argument other.
Style/OpMethod
:
Enabled
:
fals
e
Enabled
:
tru
e
# Check for simple usages of parallel assignment. It will only warn when
# the number of variables matches on both sides of the assignment.
...
...
@@ -509,7 +519,8 @@ Style/Semicolon:
# Checks for proper usage of fail and raise.
Style/SignalException
:
Enabled
:
false
EnforcedStyle
:
only_raise
Enabled
:
true
# Enforces the names of some block params.
Style/SingleLineBlockParams
:
...
...
@@ -534,11 +545,11 @@ Style/SpaceAfterMethodName:
# Tracks redundant space after the ! operator.
Style/SpaceAfterNot
:
Enabled
:
fals
e
Enabled
:
tru
e
# Use spaces after semicolons.
Style/SpaceAfterSemicolon
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks that the equals signs in parameter default assignments have or don't
# have surrounding space depending on configuration.
...
...
@@ -572,7 +583,7 @@ Style/SpaceBeforeFirstArg:
# No spaces before semicolons.
Style/SpaceBeforeSemicolon
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks that block braces have or don't have surrounding space.
# For blocks taking parameters, checks that the left brace has or doesn't
...
...
@@ -594,11 +605,12 @@ Style/SpaceInsideParens:
# No spaces inside range literals.
Style/SpaceInsideRangeLiteral
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for padding/surrounding spaces inside string interpolation.
Style/SpaceInsideStringInterpolation
:
Enabled
:
false
EnforcedStyle
:
no_space
Enabled
:
true
# Avoid Perl-style global variables.
Style/SpecialGlobalVars
:
...
...
@@ -606,7 +618,8 @@ Style/SpecialGlobalVars:
# Check for the usage of parentheses around stabby lambda arguments.
Style/StabbyLambdaParentheses
:
Enabled
:
false
EnforcedStyle
:
require_parentheses
Enabled
:
true
# Checks if uses of quotes match the configured preference.
Style/StringLiterals
:
...
...
@@ -619,7 +632,9 @@ Style/StringLiteralsInInterpolation:
# Checks if configured preferred methods are used over non-preferred.
Style/StringMethods
:
Enabled
:
false
PreferredMethods
:
intern
:
to_sym
Enabled
:
true
# Use %i or %I for arrays of symbols.
Style/SymbolArray
:
...
...
@@ -677,15 +692,16 @@ Style/UnneededPercentQ:
# Don't interpolate global, instance and class variables directly in strings.
Style/VariableInterpolation
:
Enabled
:
fals
e
Enabled
:
tru
e
# Use the configured style when naming variables.
Style/VariableName
:
Enabled
:
false
EnforcedStyle
:
snake_case
Enabled
:
true
# Use when x then ... for one-line cases.
Style/WhenThen
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for redundant do after while or until.
Style/WhileUntilDo
:
...
...
@@ -693,7 +709,7 @@ Style/WhileUntilDo:
# Favor modifier while/until usage when you have a single-line body.
Style/WhileUntilModifier
:
Enabled
:
fals
e
Enabled
:
tru
e
# Use %w or %W for arrays of words.
Style/WordArray
:
...
...
lib/ci/gitlab_ci_yaml_processor.rb
View file @
2c7439db
module
Ci
class
GitlabCiYamlProcessor
class
ValidationError
<
StandardError
;
end
class
ValidationError
<
StandardError
;
end
DEFAULT_STAGES
=
%w(build test deploy)
DEFAULT_STAGE
=
'test'
...
...
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