Commit 721014c9 authored by James Lopez's avatar James Lopez
Browse files

Revert "Fix merge conflicts - squashed commit"

This reverts commit 3e991230.
parent 3e991230

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -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/*
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: true
Enabled: false
# Use only ascii symbols in comments.
Style/AsciiComments:
......@@ -71,7 +68,7 @@ Style/AsciiIdentifiers:
# Checks for uses of Module#attr.
Style/Attr:
Enabled: true
Enabled: false
# Avoid the use of BEGIN blocks.
Style/BeginBlock:
......@@ -83,7 +80,7 @@ Style/BarePercentLiterals:
# Do not use block comments.
Style/BlockComments:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# 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: true
Enabled: false
# Checks for use of deprecated Hash methods.
Style/DeprecatedHashMethods:
......@@ -218,15 +215,15 @@ Style/EmptyLiteral:
# Avoid the use of END blocks.
Style/EndBlock:
Enabled: true
Enabled: false
# Use Unix-style line endings.
Style/EndOfLine:
Enabled: true
Enabled: false
# Favor the use of Fixnum#even? && Fixnum#odd?
Style/EvenOdd:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# Checks use of for or each in multiline loops.
Style/For:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# 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: true
Enabled: false
# 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: true
Enabled: false
# Keep indentation straight.
Style/IndentationConsistency:
......@@ -306,7 +298,7 @@ Style/IndentHash:
# Use Kernel#loop for infinite loops.
Style/InfiniteLoop:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# Comments should start with a space.
Style/LeadingCommentSpace:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# Use the configured style when naming methods.
Style/MethodName:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# Favor until over while for negative conditions.
Style/NegatedWhile:
......@@ -402,7 +371,7 @@ Style/NegatedWhile:
# Avoid using nested modifiers.
Style/NestedModifier:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# 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: true
Enabled: false
# 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: true
Enabled: false
# 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: true
Enabled: false
# Tracks redundant space after the ! operator.
Style/SpaceAfterNot:
Enabled: true
Enabled: false
# Use spaces after semicolons.
Style/SpaceAfterSemicolon:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# Use a single space around operators.
Style/SpaceAroundOperators:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# Checks for missing space between code and a comment on the same line.
Style/SpaceBeforeComment:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# 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: true
Enabled: false
# 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: true
Enabled: false
# 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: true
Enabled: false
# Checks for redundant do after while or until.
Style/WhileUntilDo:
Enabled: true
Enabled: false
# Favor modifier while/until usage when you have a single-line body.
Style/WhileUntilModifier:
Enabled: true
Enabled: false
# Use %w or %W for arrays of words.
Style/WordArray:
......@@ -784,28 +749,28 @@ Lint/AssignmentInCondition:
# Align block ends correctly.
Lint/BlockAlignment:
Enabled: true
Enabled: false
# Default values in optional keyword arguments and optional ordinal arguments
# should not refer back to the name of the argument.
Lint/CircularArgumentReference:
Enabled: true
Enabled: false
# Checks for condition placed in a confusing position relative to the keyword.
Lint/ConditionPosition:
Enabled: true
Enabled: false
# Check for debugger calls.
Lint/Debugger:
Enabled: true
Enabled: false
# Align ends corresponding to defs correctly.
Lint/DefEndAlignment:
Enabled: true
Enabled: false
# Check for deprecated class method calls.
Lint/DeprecatedClassMethods:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# Check for odd code arrangement in an else block.
Lint/ElseLayout:
Enabled: true
Enabled: false
# Checks for empty ensure block.
Lint/EmptyEnsure:
Enabled: true
Enabled: false
# Checks for empty string interpolation.
Lint/EmptyInterpolation:
......@@ -833,36 +798,37 @@ Lint/EmptyInterpolation:
# Align ends correctly.
Lint/EndAlignment:
Enabled: true
Enabled: false
# END blocks should not be placed inside method definitions.
Lint/EndInMethod:
Enabled: true
Enabled: false
# Do not use return in an ensure block.
Lint/EnsureReturn:
Enabled: true
Enabled: false
# The use of eval represents a serious security risk.
Lint/Eval:
Enabled: true
Enabled: false
# Catches floating-point literals too large or small for Ruby to represent.
Lint/FloatOutOfRange:
Enabled: true
Enabled: false
# The number of parameters to format/sprint must match the fields.
Lint/FormatParameterMismatch:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# 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: true
Enabled: false
# Checks of literals used in conditions.
Lint/LiteralInCondition:
Enabled: true
Enabled: false
# Checks for literals used in interpolation.
Lint/LiteralInInterpolation:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# Do not omit the accumulator when calling `next` in a `reduce`/`inject` block.
Lint/NextWithoutAccumulator:
Enabled: true
Enabled: false
# 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: true
Enabled: false
# Use parentheses in the method call to avoid confusion about precedence.
Lint/RequireParentheses:
Enabled: true
Enabled: false
# Avoid rescuing the Exception class.
Lint/RescueException:
......@@ -942,7 +908,7 @@ Lint/UnusedMethodArgument:
# Unreachable code.
Lint/UnreachableCode:
Enabled: true
Enabled: false
# Checks for useless access modifiers.
Lint/UselessAccessModifier:
......@@ -954,31 +920,33 @@ Lint/UselessAssignment:
# Checks for comparison of something with itself.
Lint/UselessComparison:
Enabled: true
Enabled: false
# Checks for useless `else` in `begin..end` without `rescue`.
Lint/UselessElseWithoutRescue:
Enabled: true
Enabled: false
# Checks for useless setter call to a local variable.
Lint/UselessSetterCall:
Enabled: true
Enabled: false
# Possible use of operator/literal/variable in void context.
Lint/Void:
Enabled: true
Enabled: false
##################### Performance ############################