mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 19:01:24 +00:00
This CL adds the DEPS entry to checkout `clang-tidy` if requested in the `.gclient` config file. A doc is added which gives some guidance on how to run `clang-tidy`. Change-Id: I92eeaff33137158ffd17315649fb333c366fc91d Bug: dawn:1414 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89801 Auto-Submit: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
951 B
951 B
Running clang-tidy
- Add
"checkout_clang_tidy": True
to.gclient
file in thecustom_vars
.{ "custom_vars": { "checkout_clang_tidy": True, } }
gclient sync
There should now be third_party/llvm-build/Release+Asserts/bin/clang-tidy
cd out
git clone https://chromium.googlesource.com/chromium/tools/build
The Chromium build folder contains the tricium
files used to run clang-tidy
Running clang-tidy over all the source can be done with:
cd ..
out/build/recipes/recipe_modules/tricium_clang_tidy/resources/tricium_clang_tidy_script.py \
--base_path $PWD \
--out_dir out/Debug \
--findings_file all_findings.json \
--clang_tidy_binary $PWD/third_party/llvm-build/Release+Asserts/bin/clang-tidy \
--all
--all
can be replaced by specific files if desired to run on individual source
files.