3 ms·
People (atleast me) ignore warnings quite often, they aren’t safe haven if you ask me.
by mkagenius 9y ago
People (atleast me) ignore warnings quite often, they aren’t safe haven if you ask me.
- _sh 9y agoHey no problem, just add -Werror to your compiler flags (C/C++/Java) or '<TreatWarningsAsErrors>true</TreatWarningsAsErrors>' to your csproj (C#).
- kiallmacinnes 9y agoThis! Treat every warning as a failure, ideally in your CI system so people can't forget, and this problem (ignoring warnings..) goes away. You will have a better, more reliable, and safer codebase once you clean up the legacy mess and turn this on..
- acomjean 9y agoI agree. Having worked in a project with warnings as errors on (c++) I found it annoying at first but it made me a better coder in the long run. Plus you get out of the habit of not reading output from the compiler because there are so many warnings...
- maljx 9y agoUnless you follow a zero warning policy they are almost useless. If you have a warning that should be ignored add a pragma disable to that file. Or disable that type of warning if it's too spammy for your project.