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

Add rubocop-rails-omakase to new Rails applications #50486

Merged
merged 15 commits into from Dec 30, 2023
Merged

Conversation

zzak
Copy link
Member

@zzak zzak commented Dec 29, 2023

Fixes #50456

This setups a basic rubocop config for new rails apps using the rubocop-rails-omakase gem: https://github.com/rails/rubocop-rails-omakase

It can be skipped with the --skip-rubocop flag.

This setups a basic rubocop config for new rails apps using the `rubocop-rails-omakase` gem:
https://github.com/rails/rubocop-rails-omakase

It can be skipped with the `--skip-rubocop` flag.
@rails-bot rails-bot bot added the railties label Dec 29, 2023
This way we get the permissions and shebang for free.
Since we were calling the rubocop command before, and not the patched binstub.
@dhh
Copy link
Member

dhh commented Dec 30, 2023

Flaky CI. Random tests dying with:

image

@dhh dhh merged commit 0fb5f67 into rails:main Dec 30, 2023
3 of 4 checks passed
@zzak zzak deleted the feature/50456 branch December 30, 2023 23:14
@zzak
Copy link
Member Author

zzak commented Dec 31, 2023

Thanks for the review!

I was trying to debug the CI failures here, but fell asleep 😴 Looking into them now:
https://buildkite.com/rails/rails/builds/103056#018cba36-45e2-474d-a71f-52e44882a198

def test_rubocop_is_skipped_if_required
run_generator [destination_root, "--skip-rubocop"]

assert_no_gem "rubocop"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could it be rubocop-rails-omakase, instead of rubocop?

-assert_no_gem "rubocop"
+assert_no_gem "rubocop-rails-omakase"

Copy link
Member

Choose a reason for hiding this comment

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

@koic You're right. Raising a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add (a very basic!!) Rubocop by default
6 participants