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

Prevent direct rubocop CLI use #556

Open
saturnflyer opened this issue Apr 27, 2023 · 3 comments
Open

Prevent direct rubocop CLI use #556

saturnflyer opened this issue Apr 27, 2023 · 3 comments
Labels
question 🤔 Further information is requested

Comments

@saturnflyer
Copy link

saturnflyer commented Apr 27, 2023

A problem I've seen when moving to standardrb for one project is that people can still run bundle exec rubocop and they get some very scary looking output.

Switching to bundle exec standardrb gets us back to a happy place but this has come up often enough that I'm wondering if there's a way to either prevent it or inform people that using rubocop directly isn't supported.

I'm curious if anyone has thoughts or experience in managing the switch for existing projects.

@searls
Copy link
Contributor

searls commented Apr 27, 2023

As wacky as it is, if we were to do this I am very confident we'd find out about a lot of teams either intentionally using rubocop to run Standard's rules or who have cause to run both Standard and RuboCop (which was more common before extend_config and plugins options, for instance running rubocop for only rspec/minitest and standard for the rest).

The only real idea I have might be to add a disable_rubocop_cli YAML option which would rely on us wrapping/overriding the CLI (If that's even possible, haven't had a reason to try something like that before) to help teams that are transitioning away from RuboCop from accidentally running it out of habit, as per your original question.

@searls searls added the question 🤔 Further information is requested label Apr 27, 2023
@saturnflyer
Copy link
Author

Thanks. I figured that this is fraught with trouble, but I at least want to start the discussion.
Perhaps there's something I can learn about how others are handling an issue like this.

@pboling
Copy link
Contributor

pboling commented May 9, 2023

The experimental override is working for me, and results in gradual always running!

require:
  - rubocop/gradual/patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question 🤔 Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants