gitlab-org--gitlab-foss/lib/ci
Robert Speicher 3c2d0cf24c Merge branch 'complexity/enable-multiple-rubocop-cops-2' into 'master'
Enable multiple compatible Rubocop cops

## What does this MR do?

This MR enables multiple Rubocop cops, that are already compatible with
our codebase. See #17406.

Cops enabled:

```text
Style/ArrayJoin:
  Description: Use Array#join instead of Array#*.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
----------------
Style/Attr:
  Description: Checks for uses of Module#attr.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
----------------
Style/BlockComments:
  Description: Do not use block comments.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
----------------
Style/ClassMethods:
  Description: Use self when defining module/class methods.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-class-methods
----------------
Style/EndBlock:
  Description: Avoid the use of END blocks.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
----------------
Style/EvenOdd:
  Description: Favor the use of Fixnum#even? && Fixnum#odd?
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
----------------
Style/FileName:
  Description: Use snake_case for source file names.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
  ExpectMatchingDefinition: false
----------------
Style/FirstMethodParameterLineBreak:
  Description: Checks for a line break before the first parameter in a multi-line method
    parameter definition.
----------------
Style/FlipFlop:
  Description: Checks for flip flops
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
----------------
Style/GlobalVars:
  Description: Do not introduce global variables.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
  Reference: http://www.zenspider.com/Languages/Ruby/QuickRef.html
----------------
Style/IfWithSemicolon:
  Description: Do not use if x; .... Use the ternary operator instead.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
----------------
Style/LambdaCall:
  Description: Use lambda.call(...) instead of lambda.(...).
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
  EnforcedStyle: call
----------------
Style/MethodName:
  Description: Use the configured style when naming methods.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
  EnforcedStyle: snake_case
----------------
Style/MultilineMethodDefinitionBraceLayout:
  Description: Checks that the closing brace in a method definition is symmetrical with
    respect to the opening brace and the method parameters.
----------------
Style/NestedModifier:
  Description: Avoid using nested modifiers.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-modifiers
----------------
Style/OpMethod:
  Description: When defining binary operators, name the argument other.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
----------------
Style/SignalException:
  Description: Checks for proper usage of fail and raise.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-raise-over-fail
  EnforcedStyle: only_raise
----------------
Style/SpaceAfterNot:
  Description: Tracks redundant space after the ! operator.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
----------------
Style/SpaceBeforeSemicolon:
  Description: No spaces before semicolons.
----------------
Style/SpaceInsideRangeLiteral:
  Description: No spaces inside range literals.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
----------------
Style/SpaceInsideStringInterpolation:
  Description: Checks for padding/surrounding spaces inside string interpolation.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation
  EnforcedStyle: no_space
----------------
Style/StabbyLambdaParentheses:
  Description: Check for the usage of parentheses around stabby lambda arguments.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#stabby-lambda-with-args
  EnforcedStyle: require_parentheses
----------------
Style/StringMethods:
  Description: Checks if configured preferred methods are used over non-preferred.
  PreferredMethods:
    intern: to_sym
----------------
Style/VariableInterpolation:
  Description: Don't interpolate global, instance and class variables directly in strings.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
----------------
Style/VariableName:
  Description: Use the configured style when naming variables.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
  EnforcedStyle: snake_case
----------------
Style/WhenThen:
  Description: Use when x then ... for one-line cases.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
----------------
Style/WhileUntilModifier:
  Description: Favor modifier while/until usage when you have a single-line body.
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
  MaxLineLength: 80
```

Closes #17406 

See merge request !4286
2016-05-25 19:41:10 +00:00
..
api Add minor corrections related to config of runner 2016-05-19 22:01:53 +02:00
assets Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
ansi2html.rb Replace \n to <br> 2016-05-23 21:59:07 -05:00
charts.rb Fix Error 500 in CI charts by gracefully handling commits with no durations 2016-05-22 23:52:50 -07:00
gitlab_ci_yaml_processor.rb Enable multiple compatible Rubocop cops 2016-05-25 06:17:29 +02:00
model.rb Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
static_model.rb Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
version_info.rb Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00