Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
0bb0c01a350a
Commit
721014c9
authored
Jun 03, 2016
by
James Lopez
Browse files
Revert "Fix merge conflicts - squashed commit"
This reverts commit
7a0cd631f3f5
.
parent
7a0cd631f3f5
Changes
1000
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
1000 of 1000+
files are displayed.
Plain diff
Email patch
.gitignore
View file @
0bb0c01a
...
...
@@ -4,46 +4,46 @@
.bundle
.chef
.directory
/
.envrc
/
.gitlab_shell_secret
.envrc
.gitlab_shell_secret
.idea
/
.rbenv-version
.rbenv-version
.rbx/
/
.ruby-gemset
/
.ruby-version
/
.rvmrc
.ruby-gemset
.ruby-version
.rvmrc
.sass-cache/
/
.secret
/
.vagrant
/
.byebug_history
/
Vagrantfile
/
backups/*
/
config/aws.yml
/
config/database.yml
/
config/gitlab.yml
/
config/gitlab_ci.yml
/
config/initializers/rack_attack.rb
/
config/initializers/smtp_settings.rb
/
config/initializers/relative_url.rb
/
config/resque.yml
/
config/unicorn.rb
/
config/secrets.yml
/
config/sidekiq.yml
/
coverage/*
/
db/*.sqlite3
/
db/*.sqlite3-journal
/
db/data.yml
/
doc/code/*
/
dump.rdb
/
log/*.log*
/
nohup.out
/
public/assets/
/
public/uploads.*
/
public/uploads/
/
shared/artifacts/
/
rails_best_practices_output.html
.secret
.vagrant
.byebug_history
Vagrantfile
backups/*
config/aws.yml
config/database.yml
config/gitlab.yml
config/gitlab_ci.yml
config/initializers/rack_attack.rb
config/initializers/smtp_settings.rb
config/initializers/relative_url.rb
config/resque.yml
config/unicorn.rb
config/secrets.yml
config/sidekiq.yml
coverage/*
db/*.sqlite3
db/*.sqlite3-journal
db/data.yml
doc/code/*
dump.rdb
log/*.log*
nohup.out
public/assets/
public/uploads.*
public/uploads/
shared/artifacts/
rails_best_practices_output.html
/tags
/
tmp/
*
/
vendor/bundle/*
/
builds/*
/
shared/*
tmp/
vendor/bundle/*
builds/*
shared/*
.rubocop.yml
View file @
0bb0c01a
require
:
rubocop-rspec
AllCops
:
TargetRubyVersion
:
2.1
# Cop names are not displayed in offense messages by default. Change behavior
...
...
@@ -23,7 +21,6 @@ AllCops:
-
'
lib/email_validator.rb'
-
'
lib/gitlab/upgrader.rb'
-
'
lib/gitlab/seeder.rb'
-
'
generator_templates/**/*'
##################### Style ##################################
...
...
@@ -59,7 +56,7 @@ Style/AndOr:
# Use `Array#join` instead of `Array#*`.
Style/ArrayJoin
:
Enabled
:
tru
e
Enabled
:
fals
e
# Use only ascii symbols in comments.
Style/AsciiComments
:
...
...
@@ -71,7 +68,7 @@ Style/AsciiIdentifiers:
# Checks for uses of Module#attr.
Style/Attr
:
Enabled
:
tru
e
Enabled
:
fals
e
# Avoid the use of BEGIN blocks.
Style/BeginBlock
:
...
...
@@ -83,7 +80,7 @@ Style/BarePercentLiterals:
# Do not use block comments.
Style/BlockComments
:
Enabled
:
tru
e
Enabled
:
fals
e
# Put end statement of multiline block on its own line.
Style/BlockEndNewline
:
...
...
@@ -124,7 +121,7 @@ Style/ClassCheck:
# Use self when defining module/class methods.
Style/ClassMethods
:
Enabled
:
tru
e
Enabled
:
fals
e
# Avoid the use of class variables.
Style/ClassVars
:
...
...
@@ -154,7 +151,7 @@ Style/ConstantName:
# Use def with parentheses when there are arguments.
Style/DefWithParentheses
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for use of deprecated Hash methods.
Style/DeprecatedHashMethods
:
...
...
@@ -218,15 +215,15 @@ Style/EmptyLiteral:
# Avoid the use of END blocks.
Style/EndBlock
:
Enabled
:
tru
e
Enabled
:
fals
e
# Use Unix-style line endings.
Style/EndOfLine
:
Enabled
:
tru
e
Enabled
:
fals
e
# Favor the use of Fixnum#even? && Fixnum#odd?
Style/EvenOdd
:
Enabled
:
tru
e
Enabled
:
fals
e
# Do not use unnecessary spacing.
Style/ExtraSpacing
:
...
...
@@ -234,20 +231,15 @@ Style/ExtraSpacing:
# Use snake_case for source file names.
Style/FileName
:
Enabled
:
true
# Checks for a line break before the first parameter in a multi-line method
# parameter definition.
Style/FirstMethodParameterLineBreak
:
Enabled
:
true
Enabled
:
false
# Checks for flip flops.
Style/FlipFlop
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks use of for or each in multiline loops.
Style/For
:
Enabled
:
tru
e
Enabled
:
fals
e
# Enforce the use of Kernel#sprintf, Kernel#format or String#%.
Style/FormatString
:
...
...
@@ -255,7 +247,7 @@ Style/FormatString:
# Do not introduce global variables.
Style/GlobalVars
:
Enabled
:
tru
e
Enabled
:
fals
e
# Check for conditionals that can be replaced with guard clauses.
Style/GuardClause
:
...
...
@@ -276,7 +268,7 @@ Style/IfUnlessModifier:
# Do not use if x; .... Use the ternary operator instead.
Style/IfWithSemicolon
:
Enabled
:
tru
e
Enabled
:
fals
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.
...
...
@@ -284,9 +276,9 @@ Style/IdenticalConditionalBranches:
Enabled
:
false
# Checks the indentation of the first line of the right-hand-side of a
# multi-line assignment.
# multi-line assignment.
Style/IndentAssignment
:
Enabled
:
tru
e
Enabled
:
fals
e
# Keep indentation straight.
Style/IndentationConsistency
:
...
...
@@ -306,7 +298,7 @@ Style/IndentHash:
# Use Kernel#loop for infinite loops.
Style/InfiniteLoop
:
Enabled
:
tru
e
Enabled
:
fals
e
# Use the new lambda literal syntax for single-line blocks.
Style/Lambda
:
...
...
@@ -314,11 +306,11 @@ Style/Lambda:
# Use lambda.call(...) instead of lambda.(...).
Style/LambdaCall
:
Enabled
:
tru
e
Enabled
:
fals
e
# Comments should start with a space.
Style/LeadingCommentSpace
:
Enabled
:
tru
e
Enabled
:
fals
e
# Use \ instead of + or << to concatenate two string literals at line end.
Style/LineEndConcatenation
:
...
...
@@ -330,22 +322,16 @@ Style/MethodCallParentheses:
# Checks if the method definitions have or don't have parentheses.
Style/MethodDefParentheses
:
Enabled
:
tru
e
Enabled
:
fals
e
# Use the configured style when naming methods.
Style/MethodName
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for usage of `extend self` in modules.
Style/ModuleFunction
:
Enabled
:
false
# Checks that the closing brace in an array literal is either on the same line
# as the last array element, or a new line.
Style/MultilineArrayBraceLayout
:
Enabled
:
false
EnforcedStyle
:
symmetrical
# Avoid multi-line chains of blocks.
Style/MultilineBlockChain
:
Enabled
:
false
...
...
@@ -354,32 +340,15 @@ Style/MultilineBlockChain:
Style/MultilineBlockLayout
:
Enabled
:
true
# Checks that the closing brace in a hash literal is either on the same line as
# the last hash element, or a new line.
Style/MultilineHashBraceLayout
:
Enabled
:
false
EnforcedStyle
:
symmetrical
# Do not use then for multi-line if/unless.
Style/MultilineIfThen
:
Enabled
:
true
# Checks that the closing brace in a method call is either on the same line as
# the last method argument, or a new line.
Style/MultilineMethodCallBraceLayout
:
Enabled
:
false
EnforcedStyle
:
symmetrical
# Checks indentation of method calls with the dot operator that span more than
# one line.
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
...
...
@@ -394,7 +363,7 @@ Style/MutableConstant:
# Favor unless over if for negative conditions (or control flow or).
Style/NegatedIf
:
Enabled
:
tru
e
Enabled
:
fals
e
# Favor until over while for negative conditions.
Style/NegatedWhile
:
...
...
@@ -402,7 +371,7 @@ Style/NegatedWhile:
# Avoid using nested modifiers.
Style/NestedModifier
:
Enabled
:
tru
e
Enabled
:
fals
e
# Parenthesize method calls which are nested inside the argument list of
# another parenthesized method call.
...
...
@@ -439,7 +408,7 @@ Style/OneLineConditional:
# When defining binary operators, name the argument other.
Style/OpMethod
:
Enabled
:
tru
e
Enabled
:
fals
e
# Check for simple usages of parallel assignment. It will only warn when
# the number of variables matches on both sides of the assignment.
...
...
@@ -486,9 +455,10 @@ Style/RedundantException:
Style/RedundantFreeze
:
Enabled
:
false
# TODO: Enable RedundantParentheses Cop.
# Checks for parentheses that seem not to serve any purpose.
Style/RedundantParentheses
:
Enabled
:
tru
e
Enabled
:
fals
e
# Don't use return where it's not required.
Style/RedundantReturn
:
...
...
@@ -514,12 +484,11 @@ Style/SelfAssignment:
# Don't use semicolons to terminate expressions.
Style/Semicolon
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for proper usage of fail and raise.
Style/SignalException
:
EnforcedStyle
:
only_raise
Enabled
:
true
Enabled
:
false
# Enforces the names of some block params.
Style/SingleLineBlockParams
:
...
...
@@ -540,28 +509,29 @@ Style/SpaceAfterComma:
# Do not put a space between a method name and the opening parenthesis in a
# method definition.
Style/SpaceAfterMethodName
:
Enabled
:
tru
e
Enabled
:
fals
e
# Tracks redundant space after the ! operator.
Style/SpaceAfterNot
:
Enabled
:
tru
e
Enabled
:
fals
e
# Use spaces after semicolons.
Style/SpaceAfterSemicolon
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks that the equals signs in parameter default assignments have or don't
# have surrounding space depending on configuration.
Style/SpaceAroundEqualsInParameterDefault
:
Enabled
:
false
# TODO: Enable SpaceAroundKeyword Cop.
# Use a space around keywords if appropriate.
Style/SpaceAroundKeyword
:
Enabled
:
tru
e
Enabled
:
fals
e
# Use a single space around operators.
Style/SpaceAroundOperators
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks that the left block brace has or doesn't have space before it.
Style/SpaceBeforeBlockBraces
:
...
...
@@ -569,11 +539,11 @@ Style/SpaceBeforeBlockBraces:
# No spaces before commas.
Style/SpaceBeforeComma
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for missing space between code and a comment on the same line.
Style/SpaceBeforeComment
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks that exactly one space is used between a method name and the first
# argument for method calls without parentheses.
...
...
@@ -582,7 +552,7 @@ Style/SpaceBeforeFirstArg:
# No spaces before semicolons.
Style/SpaceBeforeSemicolon
:
Enabled
:
tru
e
Enabled
:
fals
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
...
...
@@ -604,12 +574,11 @@ Style/SpaceInsideParens:
# No spaces inside range literals.
Style/SpaceInsideRangeLiteral
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for padding/surrounding spaces inside string interpolation.
Style/SpaceInsideStringInterpolation
:
EnforcedStyle
:
no_space
Enabled
:
true
Enabled
:
false
# Avoid Perl-style global variables.
Style/SpecialGlobalVars
:
...
...
@@ -617,8 +586,7 @@ Style/SpecialGlobalVars:
# Check for the usage of parentheses around stabby lambda arguments.
Style/StabbyLambdaParentheses
:
EnforcedStyle
:
require_parentheses
Enabled
:
true
Enabled
:
false
# Checks if uses of quotes match the configured preference.
Style/StringLiterals
:
...
...
@@ -631,9 +599,7 @@ Style/StringLiteralsInInterpolation:
# Checks if configured preferred methods are used over non-preferred.
Style/StringMethods
:
PreferredMethods
:
intern
:
to_sym
Enabled
:
true
Enabled
:
false
# Use %i or %I for arrays of symbols.
Style/SymbolArray
:
...
...
@@ -691,24 +657,23 @@ Style/UnneededPercentQ:
# Don't interpolate global, instance and class variables directly in strings.
Style/VariableInterpolation
:
Enabled
:
tru
e
Enabled
:
fals
e
# Use the configured style when naming variables.
Style/VariableName
:
EnforcedStyle
:
snake_case
Enabled
:
true
Enabled
:
false
# Use when x then ... for one-line cases.
Style/WhenThen
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for redundant do after while or until.
Style/WhileUntilDo
:
Enabled
:
tru
e
Enabled
:
fals
e
# Favor modifier while/until usage when you have a single-line body.
Style/WhileUntilModifier
:
Enabled
:
tru
e
Enabled
:
fals
e
# Use %w or %W for arrays of words.
Style/WordArray
:
...
...
@@ -784,28 +749,28 @@ Lint/AssignmentInCondition:
# Align block ends correctly.
Lint/BlockAlignment
:
Enabled
:
tru
e
Enabled
:
fals
e
# Default values in optional keyword arguments and optional ordinal arguments
# should not refer back to the name of the argument.
Lint/CircularArgumentReference
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for condition placed in a confusing position relative to the keyword.
Lint/ConditionPosition
:
Enabled
:
tru
e
Enabled
:
fals
e
# Check for debugger calls.
Lint/Debugger
:
Enabled
:
tru
e
Enabled
:
fals
e
# Align ends corresponding to defs correctly.
Lint/DefEndAlignment
:
Enabled
:
tru
e
Enabled
:
fals
e
# Check for deprecated class method calls.
Lint/DeprecatedClassMethods
:
Enabled
:
tru
e
Enabled
:
fals
e
# Check for duplicate method definitions.
Lint/DuplicateMethods
:
...
...
@@ -817,15 +782,15 @@ Lint/DuplicatedKey:
# Check for immutable argument given to each_with_object.
Lint/EachWithObjectArgument
:
Enabled
:
tru
e
Enabled
:
fals
e
# Check for odd code arrangement in an else block.
Lint/ElseLayout
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for empty ensure block.
Lint/EmptyEnsure
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for empty string interpolation.
Lint/EmptyInterpolation
:
...
...
@@ -833,36 +798,37 @@ Lint/EmptyInterpolation:
# Align ends correctly.
Lint/EndAlignment
:
Enabled
:
tru
e
Enabled
:
fals
e
# END blocks should not be placed inside method definitions.
Lint/EndInMethod
:
Enabled
:
tru
e
Enabled
:
fals
e
# Do not use return in an ensure block.
Lint/EnsureReturn
:
Enabled
:
tru
e
Enabled
:
fals
e
# The use of eval represents a serious security risk.
Lint/Eval
:
Enabled
:
tru
e
Enabled
:
fals
e
# Catches floating-point literals too large or small for Ruby to represent.
Lint/FloatOutOfRange
:
Enabled
:
tru
e
Enabled
:
fals
e
# The number of parameters to format/sprint must match the fields.
Lint/FormatParameterMismatch
:
Enabled
:
tru
e
Enabled
:
fals
e
# Don't suppress exception.
Lint/HandleExceptions
:
Enabled
:
false
# TODO: Enable ImplicitStringConcatenation Cop.
# Checks for adjacent string literals on the same line, which could better be
# represented as a single string literal.
Lint/ImplicitStringConcatenation
:
Enabled
:
tru
e
Enabled
:
fals
e
# TODO: Enable IneffectiveAccessModifier Cop.
# Checks for attempts to use `private` or `protected` to set the visibility
...
...
@@ -873,15 +839,15 @@ Lint/IneffectiveAccessModifier:
# Checks for invalid character literals with a non-escaped whitespace
# character.
Lint/InvalidCharacterLiteral
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks of literals used in conditions.
Lint/LiteralInCondition
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for literals used in interpolation.
Lint/LiteralInInterpolation
:
Enabled
:
tru
e
Enabled
:
fals
e
# Use Kernel#loop with break rather than begin/end/until or begin/end/while
# for post-loop tests.
...
...
@@ -890,11 +856,11 @@ Lint/Loop:
# Do not use nested method definitions.
Lint/NestedMethodDefinition
:
Enabled
:
tru
e
Enabled
:
fals
e
# Do not omit the accumulator when calling `next` in a `reduce`/`inject` block.
Lint/NextWithoutAccumulator
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for method calls with a space before the opening parenthesis.
Lint/ParenthesesAsGroupedExpression
:
...
...
@@ -903,11 +869,11 @@ Lint/ParenthesesAsGroupedExpression:
# Checks for `rand(1)` calls. Such calls always return `0` and most likely
# a mistake.
Lint/RandOne
:
Enabled
:
tru
e
Enabled
:
fals
e
# Use parentheses in the method call to avoid confusion about precedence.
Lint/RequireParentheses
:
Enabled
:
tru
e
Enabled
:
fals
e
# Avoid rescuing the Exception class.
Lint/RescueException
:
...
...
@@ -942,7 +908,7 @@ Lint/UnusedMethodArgument:
# Unreachable code.
Lint/UnreachableCode
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for useless access modifiers.
Lint/UselessAccessModifier
:
...
...
@@ -954,31 +920,33 @@ Lint/UselessAssignment:
# Checks for comparison of something with itself.
Lint/UselessComparison
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for useless `else` in `begin..end` without `rescue`.
Lint/UselessElseWithoutRescue
:
Enabled
:
tru
e
Enabled
:
fals
e
# Checks for useless setter call to a local variable.
Lint/UselessSetterCall
:
Enabled
:
tru
e
Enabled
:
fals
e
# Possible use of operator/literal/variable in void context.
Lint/Void
:
Enabled
:
tru
e
Enabled
:
fals
e
##################### Performance ############################
# TODO: Enable Casecmp Cop.
# Use `casecmp` rather than `downcase ==`.
Performance/Casecmp
:
Enabled
:
tru
e
Enabled
:
fals
e
# TODO: Enable DoubleStartEndWith Cop.
# Use `str.{start,end}_with?(x, ..., y, ...)` instead of
# `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
Performance/DoubleStartEndWith
:
Enabled
:
tru
e
Enabled
:
fals
e
# TODO: Enable EndWith Cop.
# Use `end_with?` instead of a regex match anchored to the end of a string.
...
...
@@ -989,9 +957,10 @@ Performance/EndWith:
Performance/LstripRstrip
:
Enabled
:
true
# TODO: Enable RangeInclude Cop.
# Use `Range#cover?` instead of `Range#include?`.
Performance/RangeInclude
:
Enabled
:
tru
e
Enabled
:
fals
e