summaryrefslogtreecommitdiff
path: root/DEVELOPING.md
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2020-09-29 00:29:23 +0300
committerEd Tanous <ed@tanous.net>2020-09-29 21:38:42 +0300
commit2c70f8004afdc27bd42968b8bf7480f2e534974c (patch)
tree569f4cb0110aae2ccd0e4d197efe4c3a36c5b7b6 /DEVELOPING.md
parent3e4c7797033926a0502cdd4491421c8b16684aef (diff)
downloadbmcweb-2c70f8004afdc27bd42968b8bf7480f2e534974c.tar.xz
Fix naming conventions
Lots of code has been checked in that doesn't match the naming conventions. Lets fix that. Tested: Code compiles. Variable/function renames only. Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I6bd107811d0b724f1fad990016113cdf035b604b
Diffstat (limited to 'DEVELOPING.md')
-rw-r--r--DEVELOPING.md34
1 files changed, 23 insertions, 11 deletions
diff --git a/DEVELOPING.md b/DEVELOPING.md
index 6e5e1ed00f..3c33c6474d 100644
--- a/DEVELOPING.md
+++ b/DEVELOPING.md
@@ -225,17 +225,29 @@
## clang-tidy
clang-tidy is a tool that can be used to identify coding style violations, bad
-design patterns, and bug prone constructs. 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.
+design patterns, and bug prone constructs. The checks are implemented in the
+.clang-tidy file in the root of bmcweb, and are expected to be passing. To
+run, the best way is to run the checks in yocto.
```
-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-*"
-```
+# check out meta-clang in your openbmc root
+cd openbmc
+git clone https://github.com/kraj/meta-clang
+
+# add the meta-clang layer to BBLAYERS in $BBPATH/conf/bblayers.conf
+<path_to_your_build_dir>/meta-clang
+
+# Add this line to $BBPATH/conf/local.conf to build bmcweb with clang
+TOOLCHAIN_pn-bmcweb = "clang"
+# and build
+bitbake bmcweb
+
+# Open devshell (this will open a shell)
+bitbake -c devshell bmcweb
+
+# cd into the work dir
+cd oe-workdir/bmcweb-1.0+git999
+# run clang tidy
+clang-tidy --header-filter=".*" -p . $BBPATH/workspace/sources/bmcweb/src/webserver_main.cpp
+```