I have a Rails 6 project and am trying to use RuboCop's auto-correct option to fix the many Style/FrozenStringLiteralComment errors (mostly in generated files).
No matter how many times I run bundle exec rubocop --auto-correct --only Style/FrozenStringLiteralComment from the project root, Rubocop will only report the errors, but not auto-correct them:
app/models/product.rb:1:1: C: Style/FrozenStringLiteralComment: Missing frozen string literal comment.
From running with the --show-cops option I can see that this cop 'Supports --auto-correct,' so am not sure what's wrong.
My .rubocop.yml file has only one config setting: require: rubocop-rails.
I've also run bundle exec rubocop -a and it has corrected other errors in config and similar files (single-quoting, mostly).
Any idea why auto-correct won't work in this case? Thanks.