diff options
author | Lei YU <yulei.sh@bytedance.com> | 2023-08-30 06:47:14 +0000 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2023-09-25 16:25:01 +0300 |
commit | 8d6b474bf67bb8a75e8f60196f7eaf7528a85c62 (patch) | |
tree | 1a5d56603a4e64c6878577ba45fb3af15ebf2fd8 /docs/markdown | |
parent | f20f33149495b5b43bba5f06aa5b9ff4ee59a474 (diff) | |
download | meson-8d6b474bf67bb8a75e8f60196f7eaf7528a85c62.zip meson-8d6b474bf67bb8a75e8f60196f7eaf7528a85c62.tar.gz meson-8d6b474bf67bb8a75e8f60196f7eaf7528a85c62.tar.bz2 |
Add clang-tidy-fix target
Add the `clang-tidy-fix` target to apply clang-tidy fixes to the source
code.
This is done by calling `run-clang-tidy` with `-fix` argument.
Add a test case to run `clang-tidy-fix` and verify the file is changed.
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/snippets/meson_clang_tidy_fix.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/markdown/snippets/meson_clang_tidy_fix.md b/docs/markdown/snippets/meson_clang_tidy_fix.md new file mode 100644 index 0000000..3a8c772 --- /dev/null +++ b/docs/markdown/snippets/meson_clang_tidy_fix.md @@ -0,0 +1,9 @@ +## clang-tidy-fix target + +If `clang-tidy` is installed and the project's source root contains a +`.clang-tidy` (or `_clang-tidy`) file, Meson will automatically define +a `clang-tidy-fix` target that runs `run-clang-tidy` tool with `-fix` +option to apply the changes found by clang-tidy to the source code. + +If you have defined your own `clang-tidy-fix` target, Meson will not +generate its own target. |