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
Proper bug: the following will detect an offense even with 'AllowComments' => true
case foo
when :bar then # do nothing
end
Note that the following is rightfully accepted
case foo
when :bar
# do nothing
end
The spec file has multiple issues and is in need of love:
Explicit testing of AllowComments is minimal, should be expanded
Doesn't use except_offense/no_offense so spec failures are next to impossible to locate.
The default is AllowComment: true, but the :config spec will not load the defaults unless given there is a cop_config method. Add let(:cop_config) { {} } to the current spec and it fails (related to Improved shared context. Refactor & simplify some specs. #7970)
The text was updated successfully, but these errors were encountered:
marcandre
changed the title
EmptyWhen false positive with inline comments.
Lint/EmptyWhen false positive with inline comments.
May 20, 2020
'AllowComments' => true
Note that the following is rightfully accepted
The spec file has multiple issues and is in need of love:
AllowComments
is minimal, should be expandedexcept_offense
/no_offense
so spec failures are next to impossible to locate.AllowComment: true
, but the:config
spec will not load the defaults unless given there is acop_config
method. Addlet(:cop_config) { {} }
to the current spec and it fails (related to Improved shared context. Refactor & simplify some specs. #7970)The text was updated successfully, but these errors were encountered: