-
Notifications
You must be signed in to change notification settings - Fork 15
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
No rule for commented out code #88
Comments
I like this one! It should be fairly easy to implement. There are two AST nodes, |
Some other things to consider with this change would be to define other allowed comments, like: 'bs:disable-line etc |
How would you handle comments like this? sub main()
' get from the registry
username = getFromRegistry()
' print it
print username
end sub |
For devs that would like to use this feature, they would need to update those comments to work with the Also with use of
Maybe fun. |
eslint has an alternative approach, where they actually try to parse the comments, and only show errors for code that will parse without error. https://github.com/cartant/eslint-plugin-etc/blob/main/docs/rules/no-commented-out-code.md It's worth at least considering. The eslint approach would cause some unparseable commented-out-code to get missed, but might be way nicer for devs to not have to rewrite every single one of their comments to prefix with 'NOTE:' |
There is currently no rule for catching commented out code, single or multiple line that is not a
todo-pattern
ornoop
comment.The text was updated successfully, but these errors were encountered: