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
SpaceAroundOperators and AlignHash get caught in an infinite correction loop when AlignHash has EnforcedStyle: table.
Here's the file under test:
cask'adobe-air'doversion'20.0'sha256:no_check# required as upstream package is updated in-placeurl"https://airdownload.adobe.com/air/mac/download/#{version}/AdobeAIR.dmg"name'Adobe AIR'homepage'https://get.adobe.com/air/'license:gratisinstaller:script=>'Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer',:args=>%w[-silent],:sudo=>trueuninstall:script=>{:executable=>'Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer',:args=>%w[-uninstall],}zap:delete=>['~/Library/Application Support/Adobe/AIR','~/Library/Caches/com.adobe.air.ApplicationInstaller',],:rmdir=>'~/Library/Application Support/Adobe/'end
And here's RuboCop's output:
$ bundle exec rubocop --only Style/AlignHash,Style/SpaceAroundOperators --auto-correct -- Casks/adobe-air.rb
Inspecting 1 file
C
Offenses:
Casks/adobe-air.rb:22:7: C: [Corrected] Align the elements of a hash literal if they span more than one line.
:rmdir => '~/Library/Application Support/Adobe/'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Casks/adobe-air.rb:22:15: C: [Corrected] Operator => should be surrounded by a single space.
:rmdir => '~/Library/Application Support/Adobe/'
^^
0 files inspected, 2 offenses detected, 2 offenses corrected
/Users/joshuahagins/dev/github/rubocop/lib/rubocop/runner.rb:183:in `check_for_infinite_loop': Infinite loop detected in /Users/joshuahagins/dev/github/caskroom/homebrew-cask/Casks/adobe-air.rb. (RuboCop::Runner::InfiniteCorrectionLoop)
from /Users/joshuahagins/dev/github/rubocop/lib/rubocop/runner.rb:154:in `block in do_inspection_loop'
from /Users/joshuahagins/dev/github/rubocop/lib/rubocop/runner.rb:153:in `loop'
from /Users/joshuahagins/dev/github/rubocop/lib/rubocop/runner.rb:153:in `do_inspection_loop'
from /Users/joshuahagins/dev/github/rubocop/lib/rubocop/runner.rb:93:in `process_file'
from /Users/joshuahagins/dev/github/rubocop/lib/rubocop/runner.rb:58:in `block in inspect_files'
from /Users/joshuahagins/dev/github/rubocop/lib/rubocop/runner.rb:56:in `each'
from /Users/joshuahagins/dev/github/rubocop/lib/rubocop/runner.rb:56:in `inspect_files'
from /Users/joshuahagins/dev/github/rubocop/lib/rubocop/runner.rb:34:in `run'
from /Users/joshuahagins/dev/github/rubocop/lib/rubocop/cli.rb:28:in `run'
from /Users/joshuahagins/dev/github/rubocop/bin/rubocop:13:in `block in <top (required)>'
from /Users/joshuahagins/.rbenv/versions/2.3.0/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
from /Users/joshuahagins/dev/github/rubocop/bin/rubocop:12:in `<top (required)>'
from /Users/joshuahagins/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bin/rubocop:23:in `load'
from /Users/joshuahagins/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bin/rubocop:23:in `<main>'
SpaceAroundOperators
andAlignHash
get caught in an infinite correction loop whenAlignHash
hasEnforcedStyle: table
.Here's the file under test:
And here's RuboCop's output:
From my
Gemfile.lock
:The text was updated successfully, but these errors were encountered: