Mirror the rubocop-rails warning silence workaround #98
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt at resolving #72
As noted in that issue, I only vaguely understand the rubocop rule loading and validating process -- and then both rubocop-rails and standard-rails do some amount of overriding/modifying that process. Anyway, this is a first pass and maybe it's fine or maybe we can find something more elegant.
Concerns here:
TargetRailsVersion(the one worked around in rubocop-rails), since (I think?!) we are overriding the load process such that the rubocop-rails#rulesmethod never gets called, and so, one would think, whatever issue that one is working around would need to be re-worked-around?Benefits:
Random side adventure during this journey ... in the other part of this diff, where I added
Lint/UselessAccessModifierto the existing list to disable for similar reasons, there's some small inconsistency with the comment there and the rules and the history of that whole thing, I think?Style/InvertibleUnlessCondition, but not true forLint/SafeNavigationChainwhich as of https://github.com/standardrb/standard-rails/pull/22/files#diff-da3213a24b350fa386ff3bab0d6b239112408c3fe4f986cbd9d5236f7e0b61e4R31-R40 is enabledLint/RedundantSafeNavigationandStyle/InvertibleUnlessConditionfrom the base config, but then addsStyle/InvertibleUnlessConditionandLint/SafeNavigationChainto this reject line ... should that latter addition have actually beenLint/RedundantSafeNavigation(to match what was removed), and/or should they all be there?Thoughts on all topics welcome.