Monday, September 26, 2011

Incremental Linting with FlexeLint

Tools like FlexeLint are great for finding and preventing bugs and the bad practices that are often associated with them and little argument can be made for not using a good static analysis tool from the inception of a new project.  Many times however, it is desired to start reaping the benefits of such a tool with an existing code base.  The initial scan of even a carefully configured FlexeLint installation can generate a daunting number of messages that simply are not practical to address before continuing development.  Because of this, such tools are often not used on established code bases.  Being able to establish a baseline snapshot of a code base and receive diagnostics only for new or changed code would make using FlexeLint significantly more manageable for such projects and allow previously existing issues to be addressed in a more practical timeline.  Such a method can also be used to easily track issues introduced between different versions.

This post discusses a method to run FlexeLint so as to receive messages only on code that differs from a specific baseline.  The examples use FlexeLint but the ideas are relatively simple and can be easily modified to work with other tools as well.

Monday, September 5, 2011

Suppressing messages for particular files in FlexeLint

A commonly asked question regarding Flexelint is how one can suppress some or all messages for a particular file.  Although there isn't an individual option to accompish this, like there is for suppressing messages for specific symbols, types, etc., there are several ways to achieve the same effect.