You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rubocop says it's auto-correcting a Layout/LineLength error but the file does not get auto-corrected.
> rubocop -a spec/factories/authentications.rb
spec/factories/authentications.rb:2241:121: C: [Corrected] Layout/LineLength: Line is too long [126/120]
{ 'sql' => 'update table set sku=:sku, price=:price where user_id=:pkey;', 'category' => 'SQL Server Records' },
^^^^^^
In my previous rubocop version (0.84), Layout/LineLength was never correctable.
Expected behavior
Doesn't think Layout/LineLength is auto-correctable.
Actual behavior
Tries to correct line and doesn't even work.
❯ rubocop --debug -a spec/factories/authentications.rb
For /Users/jshah/code/dgapp: configuration from /Users/jshah/code/dgapp/.rubocop.yml
configuration from /Users/jshah/.rbenv/versions/2.6.6/gemsets/dgapp/gems/rubocop-rails-2.9.0/config/default.yml
configuration from /Users/jshah/.rbenv/versions/2.6.6/gemsets/dgapp/gems/rubocop-rails-2.9.0/config/default.yml
Default configuration from /Users/jshah/.rbenv/versions/2.6.6/gemsets/dgapp/gems/rubocop-1.5.2/config/default.yml
Inheriting configuration from /Users/jshah/code/dgapp/.rubocop_todo.yml
Inspecting 1 file
Scanning /Users/jshah/code/dgapp/spec/factories/authentications.rb
Loading cache from /Users/jshah/.cache/rubocop_cache/77796e83e2d7c09f6cff3e597eae70621d8d6afb/284dfa8f0276b702be6b3b9b688b22a2fad18991/38f0528caa6cf1f62ac759fee52f7348bd9ef268
C
Offenses:
spec/factories/authentications.rb:2241:121: C: [Corrected] Layout/LineLength: Line is too long. [126/120]
{ 'sql' => 'update table set sku=:sku, price=:price where user_id=:pkey;', 'category' => 'SQL Server Records' },
^^^^^^
1 file inspected, 1 offense detected, 1 offense corrected
Finished in 1.1515010000148322 seconds
Afterwards, file shows no changes.
Steps to reproduce the problem
Layout/LineLength greater than allowed then run rubocop -a <file>
The issue may have been resolved by latest RuboCop 1.6. Can you update to the latest RuboCop version?
If that doesn't work, can you provide executable reproduction code? Thank you.
Rubocop says it's auto-correcting a Layout/LineLength error but the file does not get auto-corrected.
In my previous rubocop version (0.84), Layout/LineLength was never correctable.
Expected behavior
Doesn't think Layout/LineLength is auto-correctable.
Actual behavior
Tries to correct line and doesn't even work.
Afterwards, file shows no changes.
Steps to reproduce the problem
Layout/LineLength greater than allowed then run
rubocop -a <file>
RuboCop version
The text was updated successfully, but these errors were encountered: