Skip to content

Commit

Permalink
Merge pull request #25 from zestyzesty/update-ruby-defaults
Browse files Browse the repository at this point in the history
Update rubocop names
  • Loading branch information
prollinson committed Apr 2, 2018
2 parents f1e632d + b547434 commit 2ddd55b
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions ruby/.ruby-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,20 @@ Style/CaseEquality:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
Enabled: true

Layout/BlockAlignment:
Description: 'Align block ends correctly.'
EnforcedStyleAlignWith: start_of_block
Enabled: true

Layout/CaseIndentation:
Description: 'Indentation of when in a case/when/[else/]end.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
Enabled: true

Layout/DefEndAlignment:
Description: 'Align ends corresponding to defs correctly.'
Enabled: true

Style/CharacterLiteral:
Description: 'Checks for uses of character literals.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
Expand Down Expand Up @@ -166,6 +175,13 @@ Layout/CommentIndentation:
Description: 'Indentation of comments.'
Enabled: true

Layout/ConditionPosition:
Description: >-
Checks for condition placed in a confusing position relative to
the keyword.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
Enabled: true

Style/ConditionalAssignment:
Description: >-
Use the return value of `if` and `case` statements for
Expand Down Expand Up @@ -265,6 +281,10 @@ Layout/EndOfLine:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
Enabled: true

Layout/EndAlignment:
Description: 'Align ends correctly.'
Enabled: true

Style/EvenOdd:
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
Expand Down Expand Up @@ -819,8 +839,13 @@ Style/TrailingCommaInArguments:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
Enabled: true

Style/TrailingCommaInLiteral:
Description: 'Checks for trailing comma in array and hash literals.'
Style/TrailingCommaInArrayLiteral:
Description: 'Checks for trailing comma in array literals.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
Enabled: true

Style/TrailingCommaInHashLiteral:
Description: 'Checks for trailing comma in hash literals.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
Enabled: true

Expand Down Expand Up @@ -984,29 +1009,14 @@ Lint/AssignmentInCondition:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
Enabled: true

Lint/BlockAlignment:
Description: 'Align block ends correctly.'
Enabled: true

Lint/CircularArgumentReference:
Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
Enabled: true

Lint/ConditionPosition:
Description: >-
Checks for condition placed in a confusing position relative to
the keyword.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
Enabled: true

Lint/Debugger:
Description: 'Check for debugger calls.'
Enabled: true

Lint/DefEndAlignment:
Description: 'Align ends corresponding to defs correctly.'
Enabled: true

Lint/DeprecatedClassMethods:
Description: 'Check for deprecated class method calls.'
Enabled: true
Expand Down Expand Up @@ -1035,10 +1045,6 @@ Lint/EmptyInterpolation:
Description: 'Checks for empty string interpolation.'
Enabled: true

Lint/EndAlignment:
Description: 'Align ends correctly.'
Enabled: true

Lint/EndInMethod:
Description: 'END blocks should not be placed inside method definitions.'
Enabled: true
Expand Down Expand Up @@ -1246,14 +1252,6 @@ Performance/FlatMap:
# This can be dangerous since `flat_map` will only flatten 1 level, and
# `flatten` without any parameters can flatten multiple levels.

Performance/HashEachMethods:
Description: >-
Use `Hash#each_key` and `Hash#each_value` instead of
`Hash#keys.each` and `Hash#values.each`.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-each'
Enabled: true
AutoCorrect: false

Performance/LstripRstrip:
Description: 'Use `strip` instead of `lstrip.rstrip`.'
Enabled: true
Expand Down

0 comments on commit 2ddd55b

Please sign in to comment.