0

I'm using the PC-lint on my project which uses the Google protocol buffer.

The PC-lint generates too many warnings related to xxx.pb.h.

Is there any configuration to set something like "header whitelist" to prevent this?

I know for clang-tidy, it supports doing so by passing the -header-filter.

kaixin liu
  • 89
  • 8
  • Does this answer your question? [How to exclude some particular files in Pc-lint](https://stackoverflow.com/questions/6816984/how-to-exclude-some-particular-files-in-pc-lint) – Andrew Aug 08 '22 at 08:42

1 Answers1

0

This already has an answer in How to exclude some particular files in Pc-lint

However, a word of caution in such a blanket exclusion... in amongst the noise, there may be warnings that are pertinent to your usage. Therefore, I suggest that you do (at least) one full assessment pass of the warnings/errors before you decide to ignore them all.

All warnings are there for a reason!

I appreciate you are not using , but MISRA Compliance has the concept of adopted code (such as the headers you refer) and gives guidance on what to do. I commend it to your consideration.

To repeat: any warnings/errors you get are there for a reason... understanding why you get the violation is important! And disabling specific notifications would be better than a blanket ignore all.

Andrew
  • 2,046
  • 1
  • 24
  • 37