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

Fixes #12530 - Upgrade rubocop to 0.35.1 #2924

Closed

Conversation

daviddavis
Copy link
Contributor

This is mostly because of improved problem detection. A couple cops have bugs that cause false positives and negatives. There are also some new cops I'd like to enable like Lint/DuplicateMethods but will do so after we upgrade to Rails 4

@domcleal
Copy link
Contributor

Are the disabled cops all of the new ones, or just all of the new ones that fail in some way? (Missing offence counts.)

It might be preferable to refresh the todo file from --auto-gen-config, so we get to use the new cops for future changes and keep them disabled only where there are existing problems? e.g. cops such as Performance/Detect are valuable.

@daviddavis
Copy link
Contributor Author

These are just the new cops that are failing. In rubocop 0.33.0 they changed --auto-gen-config to exclude files that have problems instead of disabling the cops altogether (see https://github.com/fusor/fusor/pull/465/files). This effectively turns on the cop for any new code. I'm not sure I like that.

However, it looks like I can generate the todo file with cops being disabled by using --exclude-limit 0. I've updated the PR with this so we can get the offense counts.

Let me know if you prefer excluding files over disabling outstanding cops.

Metrics/AbcSize:
Max: 194
Max: 114
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see we decreased the max since Rubocop was added 😄

@dLobatog
Copy link
Member

@daviddavis Rubocop is complaining about the length of 2 classes (no kidding), I'd say 👍 after fixing that.

@daviddavis
Copy link
Contributor Author

@dLobatog thanks. Should be fixed now.

@domcleal
Copy link
Contributor

Let me know if you prefer excluding files over disabling outstanding cops.

Yes, I did prefer the exclusion of files, so we get the benefit of some cops on new code - though I guess I was particularly interested in the performance ones, less that we should enforce different style. Should we make that distinction?

@daviddavis
Copy link
Contributor Author

@domcleal updated. thanks.

@domcleal
Copy link
Contributor

Merged as a9d8cde, thanks @daviddavis.

@domcleal domcleal closed this Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants