In a previous article on using Gimpel's PC-lint in Eclipse, I gave examples of setting up lint using the co‑gnu3.lnt file as a starting point. It turns out that particular file is no longer in vogue. The preferred choice for GCC compilers is co-gcc.lnt. Unfortunately, using this version requires that you take some steps to create additional files to make it operate properly.
If you want to create these files yourself from scratch, you'll need to read the gcc-readme.txt file and the comments at the top of the co-gcc.mak file. Also, if like me, you happen to have minGW installed you might have to adjust your path environment variable to remove the paths to
so that the NetBurner paths are used when running the recommended make files. I created a small .bat file with this content:
make -f co-gcc.mak ^
I then ran that file from a command prompt in a folder that also has the co-gcc.mak file provided by Gimpel. It ends with an error and fails to generate the proper size-options.lnt file but it does generate the required lint_cmac.h, lint_cppmac.h and gcc-include-path.lnt files. If you run this yourself your files may vary, but I don't see anything module specific in the results. The files just create GCC specific settings. I made one modification to the co-gcc.lnt file. Around line 38 you'll find +cpp (.cc, .C) which tells lint to treat files with those suffixes as C++ files. It was causing errors for me and since I don't use those suffixes I just commented it out.
I put up on gist the full set of files that I created for linting NetBurner programs. Clicking each link will take you directly to the contents of that file.