Modernize RuboCop configuration and fix offenses#1660
Modernize RuboCop configuration and fix offenses#1660olleolleolle merged 1 commit intolostisland:mainfrom
Conversation
39a9429 to
2b28cbc
Compare
|
This is not me blocking a merge, but this change means we are taking on following the changes in RuboCop henceforth. |
|
That is true, with the addition |
2b28cbc to
51d1fc1
Compare
- migrate from `require` to `plugins` - remove explicit new cops in favour of `NewCops: enable` - remove version boundaries from `rubocop-packaging` and `rubocop-performance` gems - add and enable `rubocop-rake` gem - auto-correct (safe only) a bunch of offenses - manually correct "useless private scoping of constant" offences - regen `.rubocop_todo.yml` to add remaining few complex offences
51d1fc1 to
0285507
Compare
olleolleolle
left a comment
There was a problem hiding this comment.
I guess we can take this step.
| # Used to detect missing arguments | ||
| NO_ARGUMENT = Object.new | ||
|
|
||
| LOCK_ERR = "can't modify middleware stack after making a request" |
There was a problem hiding this comment.
Minor:
Perhaps these constants were intended to be private constants, and their placement in the private section was just a... foiled attempt at that.
Perhaps making them private_constant would be useless, and that since they've been exposed as visible API for a long while, it's de facto our current public API.
So, with those thoughts, I recommend this move.
Description
Modernizes and generally simplifies our RuboCop usage via the following:
requiretopluginsNewCops: enablerubocop-packagingandrubocop-performancegemsrubocop-rakegem.rubocop_todo.ymlto add remaining few complex offencesTodos
List any remaining work that needs to be done, i.e:
None if CI looks good. Passed locally.
Additional Notes
Local testing and RuboCop, for reference.