Created
February 16, 2023 11:46
-
-
Save dyigitpolat/673483949ec9270ca6900652c2f568b9 to your computer and use it in GitHub Desktop.
c++20 script to run clang tidy in include and src
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run clang tidy for all files in include and src | |
# get the list of files | |
files=$(find include src -name "*.hpp" -o -name "*.cpp") | |
# useful checks for c++20 | |
checks="-*,readability*,clang-analyzer*,cppcoreguidelines*,bugprone*,modernize*" | |
# run clang tidy | |
for file in $files ; do | |
echo "Running clang-tidy on $file" | |
echo "" | |
clang-tidy-15 -header-filter=.* -checks=$checks $file -- -Iinclude -std=c++20 | |
echo "" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment