You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation should provide an example of C++ static code analysis #4637
C++ is a complex beast, and there is a number of static code analysis (SCA) tools which aim to help developers tame this complexity. The tools are run best as part of the build, but they can be slow.
Documentation should provide an example of running a set of SCA tools as part of the build. It can show SCons' abilities of automatic dependency tracking and caching which enable users to run precise SCA scans as part of the inner development loop without sacrificing development performance.
It takes ~2.2 seconds clean on a single core, and ~0.16 seconds when C++/SCons files are unchanged. Most notably, it only takes ~0.7 seconds when one of the two C++ files changed, due to parallelization and caching. Header dependencies are tracked, and a change is detected and leads to a precisely minimal run of the SCA tools.
Feel free to take the idea further, I am not familiar with the docbook format (I like AsciiDoc very much, though ;-)).
This is not something we'd put in the users guide, but it should fit in the cook book.. https://github.com/SCons/cookbook
Feel free to make a PR against that.
Activity
rico-chet commentedon Nov 13, 2024
Here's an example I came up with:
It takes ~2.2 seconds clean on a single core, and ~0.16 seconds when C++/SCons files are unchanged. Most notably, it only takes ~0.7 seconds when one of the two C++ files changed, due to parallelization and caching. Header dependencies are tracked, and a change is detected and leads to a precisely minimal run of the SCA tools.
Feel free to take the idea further, I am not familiar with the docbook format (I like AsciiDoc very much, though ;-)).
bdbaddog commentedon Nov 14, 2024
This is not something we'd put in the users guide, but it should fit in the cook book..
https://github.com/SCons/cookbook
Feel free to make a PR against that.