Running Splint on C Project | Include Problems & Running on a Complete Project

424 Views Asked by At

I'm trying to run Splint to analyze a C repo (in this case the source code for the sudo command) but cannot get Splint to find the headers for a single file on its own. In this case, there is a generated header file "config.h" which is in the root folder of the project. I have added the include path of the project's root folder and the project's "include" folder (where most headers reside). Below I have added a screenshot which shows that the header file is indeed in the root directory of the project and the error which follows stating that the header was not found in the path which includes that very directory.

Splint not finding header which is in the include path:

The other portion of my question may be a bit of a tricky one to answer as well. I've found examples on here of folks running Splint on single files but not on complete projects such as this. Before someone hits me with a good 'ol RTFM, I have read through the operation section, the "Complete Program" section, and Appendix B which states every flag that Splint supports and nowhere did I find something that indicated to me how to run Splint on a complete project. If I overlooked it, I would be grateful to anyone who finds it. (Here's the manual for anyone interested!)

1

There are 1 best solutions below

1
On

Note: Commonly you should only post one question at a time. Please do so the next time.

Part 1

Try to add each directory on its own:

-I"$(pwd)" -I"$(pwd)/include"

Part 2

See section 13.2 of the manual. There are two relevant options, topuse and partial.