Does anyone have any good tips on using pc-lint?

What are some guidelines for using pc-lint - how to get through zillion options?

I am particularly interested in the best ways to read / analyze output files.

+4
source share
4 answers

There is Visual Lint, which is based on PC-Lint, which makes messages more friendly. Unfortunately, it is not free and only works with Windows with Visual Studio. They have a trial version of IIRC.

Cm.

Since my employer was cheap at the time, I did not get the full version, although I found it useful.

+2
source

The ALOA project offers free code to analyze PC-Lint output and perform regression analysis on repeated runs.

There's a nice little article on How to Use PC Lint , which I recommend.

The Riverblade people who published Visual Lint have published several configuration articles:

+2
source

Well, I don't know free / opensource tools designed to handle pc-lint output, but I used the following strategy using splint

  • To determine which options to include: we looked at the detected defects and saw what could be detected by the bus. In fact, it is a matter of going through the tire options and deciding on the weather. This is what, if left undedected, will or will cause a problem for us.
  • Regarding the output process, we have developed some awk scripts that will give a brief description of the warning and the details of where each warning occurred, rather than being intertwined with the output of the compiler. It is also possible to report only warnings about new / modified code.
+1
source

"Indian Hill C Style and Coding Standards" talks about approaches to using Lint.

My approach to any static analysis tool is to define your local coding standard (or use an existing one) and then apply the static analysis rules that enforce this standard. Explicitly disable rules for code that you allow, and leave rules for all aspects that your standard has never considered; when they arise, think about whether your coding standard needs to be modified or if the rule should be disabled, or is it just a coding error that should be fixed without changing either the standard or the analyzer configuration.

0
source

Source: https://habr.com/ru/post/1306592/


All Articles