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

rubocop --show-cops isn't updated to match .rubocop.yml #848

Closed
whatyouhide opened this issue Mar 2, 2014 · 1 comment
Closed

rubocop --show-cops isn't updated to match .rubocop.yml #848

whatyouhide opened this issue Mar 2, 2014 · 1 comment
Assignees
Labels

Comments

@whatyouhide
Copy link

Config

I'm on OSX 10.9.1. rubocop -V gives:

0.18.1 (using Parser 2.1.5, running on ruby 2.0.0 x86_64-darwin13.0.0)

Issue

I have a .rubocop.yml file in a directory, which contains only:

WordArray:
  MinSize: 4

and a file test.rb which contains:

['a', 'b', 'c', 'd', 'e']

When I run rubocop --format offences I get:

1 WordArray

which is fine. When I run rubocop --show-cops however, it says:

WordArray:
  Description: Use %w or %W for arrays of words.
  Enabled: true
  MinSize: 0

Why isn't the output of the --show-cops command updated to match the content of .rubocop.yml regardless of what the output of rubocop -h says for the --show-cops option? Here's a quote from that output

Shows the given cops, or all cops by
default, and their configurations for the
current directory.

@jonas054 jonas054 added the bug label Mar 2, 2014
@jonas054
Copy link
Collaborator

jonas054 commented Mar 2, 2014

@whatyouhide You're right. It shows the default configuration even though the documentation and the specs say that it should be the actual configuration for the directory. I'll see if I can fix it.

@jonas054 jonas054 self-assigned this Mar 2, 2014
bbatsov added a commit that referenced this issue Mar 3, 2014
[Fix #848] Make --show-cops print current configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants