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
Do all the remaining TODOs #74
Conversation
We should be able to use groups to avoid issues with this Cop, and otherwise disable it in the specific repos that have unresolvable issues with it.
This conflicts with our predominant use of has_many (300), vs. has_and_belongs_to_many (15). Although this Cop doesn't support auto-correction, it should be practical to fix the 15 issues manually - it's possible some of them aren't even necessary!
This still causes issues in some of our repos, where developers have put output statements in DB migrations. Since a human is unlikely to see the result of this output, we should go ahead and disallow this, and manually resolve silence the issue for historical files, by using a comment in the file itself (to avoid setting a precedent).
Testing against a number of apps only shows major issues in Whitehall, for which a simple substitution command should suffice. If necessary, we can always pass 'validate: false' to explicitly disable validations. Tested against: - Content Publisher - Whitehall - Search API - Email Alert API
This is an analog of Style/GuardClause, which we have enabled.
We should use the online docs instead, which are up-to-date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Shame that SkipsModelValidations
still uses the Blacklist
terminology, but we don't necessarily need to shave that yak here.
@richardTowers thanks for reviewing - I hesitated with the |
Closes: #42
Please see the commits for more details.