Warnings as Errors in Production Environments

Leave a Reply

Comment as a guest.

  1. For my code I do my best to keep it warning free. I have started jobs at so many locations where there are thousands of warnings in the code with most of them being very easy fixes. Once you are trained to ignore warnings they grow quickly and it is very easy to ignore the ones that are helpful. Nothing like filling the output of every Jenkins build process with thousands of extra lines of warnings.
    Turn off the warnings you don’t care about. Why see them every day if you have no desire to ever fix them? Of course this is much easier to do in a static language like Java or C#. When it comes to JavaScript you are bound to get warnings in the console based on the current browser. Still you can use JSHint or JSLint to weed out code warnings.
    I have not yet used warnings as errors for a production build. I do treat warnings seriously and do my best to eliminate them. They are another helpful tool in by toolbox.
    Warnings can help you become a better coder. Learn how to fix it once and don’t continue to make that mistake.

Sliding Sidebar