Skip to content

Commit

Permalink
Update rubocop defaults for hound
Browse files Browse the repository at this point in the history
  • Loading branch information
Piers Rollinson committed Apr 2, 2018
1 parent f1e632d commit afd8dda
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 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,7 +839,12 @@ Style/TrailingCommaInArguments:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
Enabled: true

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

Style/TrailingCommaInHashLiteral:
Description: 'Checks for trailing comma in array and 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 afd8dda

Please sign in to comment.