We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the test file
puts 'Hello'
when using RuboCop defaults and running
$ rubocop -a test.rb
then it should insert a frozen string literal comment.
The test file is left unchanged. Output:
$ rubocop -a test.rb Inspecting 1 file C Offenses: test.rb:1:1: C: Style/FrozenStringLiteralComment: Missing frozen string literal comment. puts 'Hello' ^ 1 file inspected, 1 offense detected
$ [bundle exec] rubocop -V 0.88.0 (using Parser 2.7.1.4, rubocop-ast 0.1.0, running on ruby 2.5.8 x86_64-linux)
The text was updated successfully, but these errors were encountered:
The rubocop -a option behaviour has been changed from RuboCop 0.87. https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md#changes-2
rubocop -a
Can you use rubocop -A or rubocop --auto-correct-all instead, for Style/FrozenStringLiteralComment unsafe cop? https://docs.rubocop.org/rubocop/0.88/usage/auto_correct.html
rubocop -A
rubocop --auto-correct-all
Style/FrozenStringLiteralComment
Thank you.
Sorry, something went wrong.
It would be nice if the potentially correctable offenses was shown; I opened #8362
No branches or pull requests
Expected behavior
Given the test file
when using RuboCop defaults
and running
then it should insert a frozen string literal comment.
Actual behavior
The test file is left unchanged. Output:
RuboCop version
The text was updated successfully, but these errors were encountered: