-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Style/Copyright Bug #2068
Comments
A minimal reproducible use-case would be much appreciated. The cop's not on by default and hasn't been tested much in the field so far. |
Here was my use case. On OS X and Ruby 2.2.2 run Style/Copyright:
Enabled: true Run |
I meant we need some Ruby file that will produce this offense. |
The boiler plate created by bundle gem is enough. Even one of its .rb files is enough. Bundler's gem command is a generator. This gist holds one of the ruby files and the full output of rubocop -a. https://gist.github.com/philoserf/5f309bee863151eb80ce |
I'll be able to look more closely at the code, the spec, and try some other ruby versions today. |
I have tested with clean ruby installations of Ruby 2.0.0-p645, 2.1.6, and 2.2.2 on OS X 10.10 using rbenv. The Style/Copyright cop works with It fails with autocorrect enabled, I will look at the autocorrect code in that cop next. |
I see the issue now. When run as But when rub as I am missing a required config value in my .rubocop.yml BUT I only learn that with debug enabled. |
More detail With a Style/Copyright:
Enabled: true
AutocorrectNotice: 'Copyright 2015 by name' The autocorrect runs BUT injects the value as written Style/Copyright:
Enabled: true
AutocorrectNotice: '# Copyright 2015 by name' then the cop fails with I have to break for the day. I hope to look at the code and the tests for correction/improvement tomorrow. |
I decided to give the copyright style cop a try. No joy. I will dig in to the spec/code tomorrow.
The text was updated successfully, but these errors were encountered: