SHARC-212 Update rubocop exclude inheritance #12
Merged
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.
The
inherit_mode
merge type "Exclude" allows this repo to inherit the excluded files list frompanolint-ruby
since this config inherits from that.rubocop.yml
file. This is necessary because files that aren't required for rubocop to pass locally (e.g. the vendor files specified here) can fail to pass rubocop when tests run in the CI pipeline. We want to ensure that repos using this gem have consistent sets of files excluded, though more can be added to the defaults. In NDS, we also merge in additional exclusions here.Testing:
metrics-recorder
repo, which is still currently using the old panolint gem. To test, I updated the repo to install this gem from this specific branch, as well aspanolint-ruby
(from the "main" branch). I bundle installed, ran local tests for the repo, ran rubocop locally, then also pushed a build to CI to ensure it passed (it did pass, which it did not when using the "main" branch of thepanolint-rails
gem without merging the exclude list in metrics-recorder's rubocop.yml file).nds
, which is the only repo currently using this gem. I updated NDS to pull from this branch and bundle installed overcommit gems. Confirmed it pulled using this branch and then I ran rubocop. The same violations appeared there as with the "main" branch.