Skip to content

Rubocop config is not setup to actually lint the library #370

@jbaxendale-ut

Description

@jbaxendale-ut

When attempting to lint changes on my Fork in hope of upstream merges, I noticed the config does not seem to be up to date and matching the lockfile's Rubocop version.

Namely you see a host of issues:

.ruby-style.yml:240: `Style/IfWithSemicolon` is concealed by line 752
.ruby-style.yml:245: `Style/InfiniteLoop` is concealed by line 762
.ruby-style.yml:28: `Style/FrozenStringLiteralComment` is concealed by line 1053
.ruby-style.yml:1009: `Layout/SpaceBeforeFirstArg` is concealed by line 1058
.ruby-style.yml: Warning: Lint/ConditionPosition has the wrong namespace - replace it with Layout/ConditionPosition
Error: The `Layout/AlignArray` cop has been renamed to `Layout/ArrayAlignment`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Layout/AlignHash` cop has been renamed to `Layout/HashAlignment`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Layout/AlignParameters` cop has been renamed to `Layout/ParameterAlignment`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Layout/IndentArray` cop has been renamed to `Layout/FirstArrayElementIndentation`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Layout/IndentHash` cop has been renamed to `Layout/FirstHashElementIndentation`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Layout/Tab` cop has been renamed to `Layout/IndentationStyle`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Layout/TrailingBlankLines` cop has been renamed to `Layout/TrailingEmptyLines`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Lint/BlockAlignment` cop has been moved to `Layout/BlockAlignment`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Lint/EndInMethod` cop has been renamed to `Style/EndBlock`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Lint/HandleExceptions` cop has been renamed to `Lint/SuppressedException`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Lint/StringConversionInInterpolation` cop has been renamed to `Lint/RedundantStringCoercion`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Metrics/LineLength` cop has been moved to `Layout/LineLength`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Style/FlipFlop` cop has been moved to `Lint/FlipFlop`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Style/UnneededCapitalW` cop has been renamed to `Style/RedundantCapitalW`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Style/UnneededPercentQ` cop has been renamed to `Style/RedundantPercentQ`.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Lint/UselessComparison` cop has been removed since it has been superseded by `Lint/BinaryOperatorWithIdenticalOperands`. Please use `Lint/BinaryOperatorWithIdenticalOperands` instead.
(obsolete configuration found in .ruby-style.yml, please update it)
The `Style/BracesAroundHashParameters` cop has been removed. Please use  and/or  instead.
(obsolete configuration found in .ruby-style.yml, please update it)
`Rails` cops have been extracted to the `rubocop-rails` gem.
(obsolete configuration found in .ruby-style.yml, please update it)
obsolete parameter `Whitelist` (for `Style/TrivialAccessors`) found in .ruby-style.yml
`Whitelist` has been renamed to `AllowedMethods`.

Which tend to be:

  1. Lots of linter name/config changes or replacements
  2. Rules for non-included rubocop-rails that do not apply anyway
  3. The config itself basically excludes most of the library directory structure

Did not want to put these changes into my branch though, as the patch ends up being quite large and not sure what the appetite for that is 0001-Fix-Rubocop.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions