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

[Fix #6262] Optimise --auto-gen-config when Metrics/LineLength cop is disabled #6343

Conversation

tom-lord
Copy link
Contributor

@tom-lord tom-lord commented Sep 29, 2018

Resolves #6262

With this change, running rubocop --auto-gen-config will now skip "Phase 1 of 2: run Metrics/LineLength cop", if the Metrics/LineLength cop is disabled.

This makes the todo file generation faster, when line length checks are disabled.

@tom-lord tom-lord force-pushed the optimise_auto-gen-config_when_Metrics/LineLength_disabled branch from e6f9a8e to 0f2340e Compare September 29, 2018 18:58
@tom-lord tom-lord changed the title Optimise --auto-gen-config when Metrics/LineLength cop is disabled [FIX #6262] Optimise --auto-gen-config when Metrics/LineLength cop is disabled Oct 8, 2018
@tom-lord tom-lord changed the title [FIX #6262] Optimise --auto-gen-config when Metrics/LineLength cop is disabled [Fix #6262] Optimise --auto-gen-config when Metrics/LineLength cop is disabled Oct 8, 2018
@jonas054
Copy link
Collaborator

jonas054 commented Nov 1, 2018

@tom-lord Looks good, but please follow your own suggestion and present a different message when the cop is disabled.

@tom-lord tom-lord force-pushed the optimise_auto-gen-config_when_Metrics/LineLength_disabled branch from f6cfec2 to a3da4c6 Compare November 18, 2018 10:57
@tom-lord
Copy link
Contributor Author

[BUMP]

I have made further changes, as discussed above with @jonas054.
"Phase 1" of --auto-gen-config (Metrics/LineLength cop) will now be skipped if overridden or disabled, with an accurate corresponding message.

@jonas054
Copy link
Collaborator

Please update CHANGELOG.md.

@jonas054
Copy link
Collaborator

You need to add a link to your GitHub account at the bottom of the file.

@tom-lord
Copy link
Contributor Author

Ahh right, yeah.

I figured it was just some CircleCI glitch since my final commit would "obviously" not break any tests. The error message is quite clear, but unfortunately the output is so long that you need to download the full log to even see it!

I might submit a separate PR to flatten that output into something legible, for the next person.

@tom-lord tom-lord force-pushed the optimise_auto-gen-config_when_Metrics/LineLength_disabled branch from 957390c to 5276232 Compare November 20, 2018 10:50
@jonas054
Copy link
Collaborator

👍 Looks good now!

@tom-lord tom-lord force-pushed the optimise_auto-gen-config_when_Metrics/LineLength_disabled branch from 5276232 to 9549b68 Compare December 10, 2018 17:42
@tom-lord tom-lord force-pushed the optimise_auto-gen-config_when_Metrics/LineLength_disabled branch from 9549b68 to f7fe3b5 Compare December 10, 2018 17:43
@tom-lord
Copy link
Contributor Author

Is there anything holding this up from being merged? I've just had to rebase again, as the changelog diff became stale.

@jonas054 jonas054 merged commit 9341272 into rubocop:master Dec 11, 2018
@jonas054
Copy link
Collaborator

I resolved the conflict and merged the PR. Thanks, @tom-lord!
Cc @bbatsov

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.

None yet

2 participants