Android Studio: Pssst! Just so you know, you're missing all of these translations and also you should probably use @string instead of hardcoded string, and just letting you know that one of your methods is never used, and also that if statement could be made much simpler and...
Me: I DON'T GIVE A SHIT I'M TRYING TO MAKE THIS BASIC GUI APP FUCKING WORK SUPPRESSWARNINGS DO YOUR JOB
My experience with java warnings is very good, and you can suppress the unfixable ones. We thought there weren’t enough warnings so we added sonar on top!
My view is that certain warnings, when suppressed are basically programmer assertions. For example the heap pollution for varargs warning. If you can 'prove' or assert you are handling the array carefully and not polluting the heap the suppression is you saying "yes we could pollute the heap, but we aren't".
It really gets me when devs suppress deprecation warnings though...
A warning that you don't expect is often indicative of a logic error, rather than a syntax error.
If the unused variable is there because you're saying "I'm going to implement this check, but I want to test the other things first", fine. If it's there because you just forgot to implement the check, then it's a ticking time bomb.
And use attributes and directives, depending on the language/compiler, to allow the warnings you know about and leave a comment. This way, when you get a warning you don't understand, it might point out a problem you don't realize.
Not at all. 90% of the time its because of some third party dependency you are using, which means its not your code but its code you rely on. Literally unfixable
For example i have 50 warnings looking like this right now
"Overriding managed version 3.5.5 for liquibase-core"
And if you allow warnings to build up, then you're never going to notice when an important one shows up, you'll just be ignoring warnings because you've allowed them and now there are hundreds.
186
u/[deleted] Sep 23 '19
Warnings are, generally speaking, as important as errors. They are errors waiting to happen.