Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--auto-gen-config doesn't disable Syntax related offences #493

Closed
akhanubis opened this issue Sep 18, 2013 · 2 comments · Fixed by #510
Closed

--auto-gen-config doesn't disable Syntax related offences #493

akhanubis opened this issue Sep 18, 2013 · 2 comments · Fixed by #510
Assignees
Labels

Comments

@akhanubis
Copy link

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
@yujinakayama
Copy link
Collaborator

Yes, it's a known issue. Syntax offences cannot be disabled currently (neither configuration nor --only option).

Currently I'm working on it and probably it will be fixed in next version.

@ghost ghost assigned yujinakayama Sep 18, 2013
@akhanubis
Copy link
Author

Ahh perfect! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants