-
Notifications
You must be signed in to change notification settings - Fork 21
Description
I had opened #98 right at same time as the other PR which handled same issue. That PR just merged, so mine closed, which makes sense. Glad the noise thing is handled.
Pulling a maybe still relevant thought out of there -- there's some small inconsistency with the comment here - https://github.com/standardrb/standard-rails/blob/main/lib/standard/rails/plugin.rb#L47-L61 - and the rules and the history of that whole thing. The comment says standard does not enable these cops
- That is true for
Style/InvertibleUnlessCondition(configured in rubocop-rails - https://github.com/rubocop/rubocop-rails/blob/master/config/default.yml#L1315-L1321 - not modified in standard-rails) - Also true for
Lint/UselessAccessModifier(disabled via https://github.com/standardrb/standard-rails/blob/main/config/base.yml#L33-L34) - But not true for
Lint/SafeNavigationChainwhich as of https://github.com/standardrb/standard-rails/pull/22/files#diff-da3213a24b350fa386ff3bab0d6b239112408c3fe4f986cbd9d5236f7e0b61e4R31-R40 is actually enabled
The commit which added this "without extended" - acccb02 - removed Lint/RedundantSafeNavigation and Style/InvertibleUnlessCondition from the base config, but then adds Style/InvertibleUnlessCondition and Lint/SafeNavigationChain to this reject line ... should that latter addition have actually been Lint/RedundantSafeNavigation (to match what was removed), and/or should they all be there? Maybe I'm misunderstanding something about the comment or rule loading.
At minimum, does the comment need an update to make the "doesnt enable" portion more accurate?
I realize this is sort of nit picky and (I think) there's no broken behavior, just highlighting something which briefly confused me on the other PR.