bensheldon / good_job

Multithreaded, Postgres-based, Active Job backend for Ruby on Rails.
https://goodjob-demo.herokuapp.com/
MIT License
2.53k stars 190 forks source link

Add missing newline after frozen string literal for migrations #1392

Closed Earlopain closed 1 week ago

Earlopain commented 1 week ago

Very small nit. All the other current migrations follow the RuboCop rule. It's erb so RuboCop doesn't know about it.

bensheldon commented 1 week ago

Thank you!!

Probably years late to this party, but I just started adding this to my projects:

# config/environments/development.rb
  # Run Rubocop after generating files
  Rails.application.configure do
    config.generators.after_generate do |files|
      parsable_files = files.filter { |file| file.end_with?('.rb') }
      system("bundle exec rubocop -A --fail-level=E #{parsable_files.shelljoin}", exception: true) unless parsable_files.empty?
    end
  end
Earlopain commented 1 week ago

https://github.com/rails/rails/pull/50506 will expose it nicely with a rails config option, you'll probably like that then. Though I wonder if doing unsafe autocorrect is a sane default :thinking:

bensheldon commented 1 week ago

Oh nice! Thanks for sharing that Rails change!

Though I wonder if doing unsafe autocorrect is a sane default 🤔

Unfortunately, the ones I'm most likely to forget, like Frozen String Literals, are unsafe 😭