commit | 662890f1df6186a3fcaf5acabebfd4d44d0cae36 | [log] [tgz] |
---|---|---|
author | Ed Tanous <ed@tanous.net> | Mon Sep 28 17:35:20 2020 -0700 |
committer | Andrew Geissler <geissonator@yahoo.com> | Thu Oct 01 17:24:31 2020 +0000 |
tree | eda7592ef11b8d74c6d94d64cf08fec30624062d | |
parent | 78b54ba0c5bf80db9c7e81483114bf0a7ba5bd18 [diff] |
Run clang-tidy builds on clang As-is, clang-tidy uses the default compile-commands.json from the gcc build. Unfortunately, gcc implements different flags than clang these days, and clang-tidy requires the clang flags. Because of that, we need to use a clang-specific compile-commands.json. This commit adds a new build dir named tidy-build, and runs the cmake configure task in it against the clang compilers. Note, the hope is that this change allows something like this: https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/36888 To succeed in CI. Having this build run correctly will help me as a maintainer. I'm guessing that clang-tidy will correctly flag 50% of the common mistakes people make in bmcweb. I intend to get this running on entity-manager and dbus-sensors repos as well. Tested: Ran ./openbmc-build-scripts/run-unit-test-docker.sh against this patchset: https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/36888 ... and observed clang-tidy run correctly. clang-tidy did not pass because of actual found issues (most of which are in review to be fixed), but correctly ran clang-tidy, and identified a bunch of issues, which is glorious. Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I0f0754f2026e1cf2ae9ca7df868f9022d6585c32
Build script for CI jobs in Jenkins.