|
|
|
|
|
by quicklime
2114 days ago
|
|
Some teams turn on the switch in their compiler or linter that turns warnings into errors. Not many people invoke their compilers directly anymore, so disabling this requires digging into the build system configuration, which is not always simple (and as the OP mentioned, can require a full rebuild). Sometimes this is even baked into the language itself. For example Go can be strict about unused imports and variables. Python is strict about having correct indentation. |
|
I introduce unused variables all the time when I'm debugging/exploring, which always get cleaned up before commit (this is programmatically enforced, which I think is reasonable), to need to go and comment out the declarations for each variable that goes unused if I comment out a section, just because some "principle engineer" somewhere on my team (or the language design team) thinks unused variables are the devil reincarnate and can't be allowed in any build whatsoever is frankly insane. (Don't even get me started on cases where commenting out the declarations changes behavior...)