From d6cb523887d7cd8b2e102afcc40c5bf1886bb132 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 1 Jul 2023 13:33:00 +0200 Subject: [PATCH] Add clang-tidy script that runs on all files in parallel Extra options are forwarded to clang-tidy For example: ./tools/check-clang-tidy.sh --checks '-*,readability-braces-around-statements' --fix --- tools/check-clang-tidy.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 tools/check-clang-tidy.sh diff --git a/tools/check-clang-tidy.sh b/tools/check-clang-tidy.sh new file mode 100755 index 00000000000..97271f96875 --- /dev/null +++ b/tools/check-clang-tidy.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -eu + +clang-tidy --version + +find src/ -type f \( -name "*.hpp" -o -name "*.cpp" \) -print0 | parallel -0 -I {} clang-tidy --quiet "$@" "{}"