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
It seems that the offences related to new cops derivated from Syntax keep 'Syntax' as cop_name and thus rubocop-todo.yml ends up disabling a missing cop. As a result, when runing rubocop using the autogenerated config , the related offences don't get disabled.
Source:
# encoding: utf-8
puts *[1, 2, 3]
Run:
$ rubocop --auto-gen-config
Inspecting 1 file
W
Offences:
render.rb:2:3: W: `*' interpreted as argument prefix
p *[1, 2, 3]
^
1 file inspected, 1 offence detected
Created rubocop-todo.yml.
Run rubocop with --config rubocop-todo.yml, or
add inherit_from: rubocop-todo.yml in a .rubocop.yml file.
rubocop-todo.yml generated:
# This configuration was generated by `rubocop --auto-gen-config`.
# The point is for the user to remove these configuration records
# one by one as the offences are removed from the code base.
Syntax:
Enabled: false
Rerun:
$ rubocop --config rubocop-todo.yml
Inspecting 1 file
W
Offences:
render.rb:2:3: W: `*' interpreted as argument prefix
p *[1, 2, 3]
^
1 file inspected, 1 offence detected
The text was updated successfully, but these errors were encountered:
It seems that the offences related to new cops derivated from
Syntax
keep'Syntax'
ascop_name
and thusrubocop-todo.yml
ends up disabling a missing cop. As a result, when runingrubocop
using the autogenerated config , the related offences don't get disabled.Source:
Run:
rubocop-todo.yml generated:
Rerun:
The text was updated successfully, but these errors were encountered: