diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-10-24 20:48:33 +0300 |
---|---|---|
committer | James Feist <james.feist@linux.intel.com> | 2019-11-11 23:10:45 +0300 |
commit | 403e0ea38871f33570d3bff77f69832e77e3b692 (patch) | |
tree | 1b227f343a57e8ae6666d395056edcd7a22fa137 /DEVELOPING.md | |
parent | cb3e11fadd77b04f5b26aefbde18411625e5e304 (diff) | |
download | bmcweb-403e0ea38871f33570d3bff77f69832e77e3b692.tar.xz |
Document commands to run clang-tidy
clang-tidy is a useful tool for automatically finding bad coding
patterns. Add documentation for how to run it manually.
Tested:
Docs change. Ran commands and verified that clang-tidy runs.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Ibff23be17af9042c2c5d9769c5d5570e5bbe7e3e
Diffstat (limited to 'DEVELOPING.md')
-rw-r--r-- | DEVELOPING.md | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/DEVELOPING.md b/DEVELOPING.md index cd8b5c44d3..c277666f2a 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -109,7 +109,7 @@ implement a concrete interface. 11. ### phosphor webui - The webserver should be capable of hosting phosphor-webui, and impelmenting + The webserver should be capable of hosting phosphor-webui, and implementing the required flows to host the application. In general, all access methods should be available to the webui. @@ -196,3 +196,21 @@ See the [REST](https://github.com/openbmc/docs/blob/master/REST-cheatsheet.md) and [Redfish](https://github.com/openbmc/docs/blob/master/REDFISH-cheatsheet.md) cheatsheets for valid commands. + +## clang-tidy + +clang-tidy is a tool that can be used to identify coding style violations, bad +design patterns, and bug prone contructs. It's not guaranteed that all tests +pass, but ideally should be run on new code to find issues. To run, make sure +you have clang++-9 installed, and clang-tidy-9 installed, and run. the -checks +field can be modified to enable or disable which clang-tidy checks are run. +The below enables everything in the cert namespace. + +``` +mkdir build +cd build +cmake .. -DCMAKE_CXX_COMPILER=clang++-9 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON +make -j +run-clang-tidy-9 -p . -header-filter=".*" -checks="-*,cert-*" +``` + |