chiark / gitweb /
autogen: add shortcut for running scan-build
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Fri, 27 Dec 2013 20:57:12 +0000 (21:57 +0100)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sat, 28 Dec 2013 21:31:01 +0000 (22:31 +0100)
commita8c78decf0533f6ada9748ba073f861183cda837
tree18ed5c0947707f6214fa44c078e86a4ed83f27e9
parentbd3539b222e0c9bcb97fe35b4fdf79cfceade179
autogen: add shortcut for running scan-build

scan-build is a static analyzer in llvm. As ususal static analyzers
tend to mostly find theoretical bugs in software that has been in
production for a while. For in-development code it can be useful to
check if new issues is added as there is a chance to spot real problems
before release. For systemd we are now down to 297 issues - the vast
majority are false positives because the tool does not understand the
cleanup attribute.

Running clang's static analyzer scan-build is a bit messy. You have to
run both configure and make "inside" the build-scan tool. To have an
easy shortcut from autogen.sh I thus call both directly from it. This
makes it different from the other options in autogen.sh. I chose 's'
for static analysis.

scan-build is in the package clang-analyzer on fedora.
autogen.sh