-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
simple: S1008 suggests to remove comments from if()s that are specifically written to make a comment stand out #1488
Comments
Wouldn't this be a prime candidate to use the ignore tag's? e.g.: |
Of course not. |
To have the linter assume that when there are comments in place it's "OK", you already add comments. Adding a prefix to be more explicit about it instead of assuming sounds much more robust to me. Plus it allows you to find it in the future, something you've already planned for. |
Either way, reads like a dupe of #704 |
Only skip if both branches are documented; in cases where just one it can just be: // Comment it. return [..] Closes: dominikhgh-704 Closes: dominikhgh-1488
Only skip if both branches are documented; in cases where just one is commented it can just be: // Comment it. return [..] Closes: dominikhgh-704 Closes: dominikhgh-1488
Sometimes it makes sense to have code organised this way:
Gosimple's check S1008 suggests to replace this with a plain
return cond
.If a conditional
if smth { return true }
has comments inside, then do not suggest to fold it with the code that follows.The text was updated successfully, but these errors were encountered: