Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rubocop names #25

Merged
merged 2 commits into from
Apr 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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