Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHARC-212 Update rubocop exclude inheritance #12

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

mkrumholz
Copy link
Contributor

@mkrumholz mkrumholz commented Sep 18, 2023

The inherit_mode merge type "Exclude" allows this repo to inherit the excluded files list from panolint-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:

  • Tested with the 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 as panolint-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 the panolint-rails gem without merging the exclude list in metrics-recorder's rubocop.yml file).
  • Tested with 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.

Copy link
Contributor

@amymliebs amymliebs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you for the thorough description and testing notes!

@mkrumholz mkrumholz force-pushed the SHARC-212_update-rubocop-file-exclusion-inheritance branch from 89de052 to 6ab29f0 Compare September 19, 2023 15:58
@mkrumholz mkrumholz merged commit abb3d71 into main Sep 19, 2023
5 checks passed
@mkrumholz mkrumholz deleted the SHARC-212_update-rubocop-file-exclusion-inheritance branch September 19, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants