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
$ bundle exec rubocop test.rb --only Lint/SuppressedException
Inspecting 1 file
W
Offenses:
test.rb:9:1: W: Lint/SuppressedException: Do not suppress exceptions.
rescue DirectRescueInBareSingletonDef
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test.rb:37:1: W: Lint/SuppressedException: Do not suppress exceptions.
rescue # DirectRescueInBareSingletonDef
^^^^^^
test.rb:50:3: W: Lint/SuppressedException: Do not suppress exceptions.
rescue DirectRescueInSingletonMethod
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test.rb:78:3: W: Lint/SuppressedException: Do not suppress exceptions.
rescue # DirectRescueInSingletonMethod
^^^^^^
1 file inspected, 4 offenses detected
Bisect result
$ git bisect start master v0.84.0
Bisecting: 50 revisions left to test after this (roughly 6 steps)
[330f46d272d393f3e2b2a751d2876485679932d4] Clean up Layout/HeredocIndentation specs
$ git bisect run ./test.sh
(...snip...)
ebc19adbaef36733192af891995bdc6ef34cccab is the first bad commit
commit ebc19adbaef36733192af891995bdc6ef34cccab
Author: Koichi ITO <koic.ito@gmail.com>
Date: Fri May 22 14:15:42 2020 +0900
[Fix #8008] Fix an error for `Lint/SuppressedException`
Fixes #8008.
This PR fixes an error for `Lint/SuppressedException`
when empty rescue block in `def`.
:100644 100644 34a336446d643ccc97f5b05f4d9fb0e2fe9be943 86585f83c4c1e049b58dacfbab40e584051ee17f M CHANGELOG.md
:040000 040000 740733ff0d694dac78494e0cea73d7fed8196640 9f80846d6356767f2928cc1f1bf7bc0d55278a1d M lib
:040000 040000 268ae54cd2ea411993220170c979c48a6690ffdc 8790220cbfc9f8ba32626f387992043bf29c894f M spec
bisect run success
Lint/SuppressedException (with AllowComments: true) is detected at direct rescue in singleton method def.
Expected behavior
No offences detected.
Actual behavior
Lint/SuppressedException is detected at:
Not detected at:
Steps to reproduce the problem
test.rb
Bisect result
RuboCop version
The text was updated successfully, but these errors were encountered: