Line data Source code
1 0 : \cond NEVER
2 : Distributed under the MIT License.
3 : See LICENSE.txt for details.
4 : \endcond
5 : # Static Analysis Tools {#static_analysis_tools}
6 :
7 : \tableofcontents
8 :
9 : SpECTRE code is frequently run through the
10 : [Clang Tidy](http://clang.llvm.org/extra/clang-tidy/) static analyzer.
11 : Since analyzing a single source file can take over half a minute it
12 : is generally not advisable to run clang-tidy over the entire code base.
13 : If CMake isn't finding clang-tidy, make sure clang-tidy is installed and that
14 : you have chosen clang as your compiler. To analyze a single source file
15 : run, for example
16 : `make clang-tidy FILE=/path/to/source/src/DataStructures/DataVector.cpp`.
17 : To analyze the entire code base run `make clang-tidy-all`. To analyze all
18 : changed C++ source files in the commits from `FIRST_HASH` to `HEAD`, run `make
19 : clang-tidy-hash HASH=FIRST_HASH`.
|