Using the Tools menu in uVision, it is possible to "Lint All C-Source Files". It seems to be that this feeds the PC-Lint executable with all of the source files that are listed in the project, even if they are not included for the chosen target. This becomes an issue for projects that allow different implementations of an interface for different targets. PC-Lint then complains about conflicting definitions, etc. for these conflicting modules.
It would be a great help to be able to run PC-Lint for all of the C-source files that are marked as "Include in Target Build", either through inheritance, or explicitly included, for the current target. Ideally, this would be smart enough to inherit the option from groups of files. That would allow for logical groups of files that are included/excluded from specific targets and allow for linting only of the compiled output of each target.
As it is in Keil 4.73, we have resorted to generating our own sources and includes files and running PC-Lint as a user executable at compile time. This is less than ideal because it runs PC-Lint at every compile (some may argue that this is desired - perhaps another feature that could be added to the target options), and takes up 1 of the 2 possible user script slots. It also requires the user to maintain the sources file separate from the Keil project that already contains this information. I'm tempted to write a tool that parses the project file for each target to extract the includes and sources. However, it seems that as-is, the PC-Lint integration only really allows for linting of a single target.
Additionally, currently, the preprocessor defines for each target need to be copied into the lint configuration file. It would be ideal if Keil could pass each define into the call to PC-Lint, to allow for multi-target lint support.
I also am not sure why the includes folders need to be separately configured for Lint instead of just being pulled from the compiler options. It seems that if I want to lint my target, then the include paths that are used to compile should be identical to the ones passed into lint... It would also be nice if Keil passed in the compiler specific paths that are used to compile. Having to add ARMCC\Include shouldn't be required.
We have the same problem on our team. It would be extremely nice to use the built-in features in Keil for Lint. Unfortunately it's making it less of an integrated IDE and more of a compiler and place to debug. We haven't been able to find a way around this yet.