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

Commits on Dec 29, 2023

  1. Add rubocop to new rails app generator

    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.
    zzak committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    3db5ee9 View commit details
    Browse the repository at this point in the history
  2. Fix rubocop binstub to avoid loading configs from parent directories

    Based on rubygems/rubygems#6915
    
    This occurs especially when generating a new rails app within a rails checkout:
    https://github.com/rails/rails/actions/runs/7360317953/job/20036287021#step:4:171
    zzak committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    8f81b8c View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2023

  1. Move rubocop binstub to bin and make it optional

    This way we get the permissions and shebang for free.
    zzak committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    894cdec View commit details
    Browse the repository at this point in the history
  2. This fixes the issue with recursively searching for .rubocop.yml config

    Since we were calling the rubocop command before, and not the patched binstub.
    zzak committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    a7f56d1 View commit details
    Browse the repository at this point in the history
  3. whoops

    zzak committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    9719277 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    40f2c4e View commit details
    Browse the repository at this point in the history
  5. debug

    zzak committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    c3c4fcd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    488976e View commit details
    Browse the repository at this point in the history
  7. Suggest example for house style

    dhh committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    cb53803 View commit details
    Browse the repository at this point in the history
  8. Fix comment

    dhh committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    6da2356 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d59777a View commit details
    Browse the repository at this point in the history
  10. Better description

    dhh committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    f840b5e View commit details
    Browse the repository at this point in the history
  11. Not needed

    dhh committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    6c25342 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0f06871 View commit details
    Browse the repository at this point in the history
  13. Add changelog entry

    dhh committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    239611b View commit details
    Browse the repository at this point in the history