3 ms·
I could certainly see a linter that says "are you sure?" before you initially add a while loop to make you ask yourself if that's really the best option being q
by mst 5y ago
I could certainly see a linter that says "are you sure?" before you initially add a while loop to make you ask yourself if that's really the best option being quite neat.
The trick would be making it sufficiently useful and minimally annoying that people don't get angry and turn it off.
- notatoad 5y agoit's not really the linter's job to say "are you sure". the linter just applies the rules and generates messages, it's up to you to do with those messages what you will when using the python integration in vscode (which runs pylint), clicking on a linter error gives me a context menu where one of the options is essentially "are you sure?" and will automatically adds the appropriate comment to disable the linter for that line.
- mst 5y agoI was thinking along the lines of something similar except for running the linter as a pre-commit hook.