-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add Lint/NotNil
rule
#288
Add Lint/NotNil
rule
#288
Conversation
f5cb2f8
to
2db688b
Compare
2db688b
to
eb64fde
Compare
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.
Lgtm
@Sija @veelenga Do we think this is really something we should have enabled by default? I don't think a blanket "not_nil! is bad" without taking the context into consideration, which a linter is unable to do, is providing anything real meaningful. Maybe for someone new to the language it might sway them to do something different, but then everyone else who understands when/how to use it is forced to either go thru their code and add E.g. https://github.com/athena-framework/athena/actions/runs/3398343461/jobs/5651304890. I'd rather not go thru all of these cases to properly handle |
@Blacksmoke16 I was hesitant myself at the beginning, yet after checking this against several repos (incl. crystal), most of the issues were legitimate refactoring opportunities - and IMO these would be:
Remaining ones, incl. cases in which using All in all, using |
Resolves #284