Commit e45b2bc4 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Merge branch 'run-clang-tidy-parallel' into 'master'

Run clang tidy in parallel

See merge request i4/manycore/emper!372
parents 3afd04de 89dd8fae
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
ROOTDIR="$(realpath "${SCRIPTDIR}/..")" ROOTDIR="$(realpath "${SCRIPTDIR}/..")"
...@@ -23,9 +24,7 @@ RUN_CLANG_TIDY_CANDIDATES=( ...@@ -23,9 +24,7 @@ RUN_CLANG_TIDY_CANDIDATES=(
/usr/share/clang/run-clang-tidy.py /usr/share/clang/run-clang-tidy.py
) )
RUN_CLANG_TIDY="" for candidate in "${RUN_CLANG_TIDY_CANDIDATES[@]}"; do
for candidate in ${RUN_CLANG_TIDY_CANDIDATES[@]}; do
if ! command -v "${candidate}"; then if ! command -v "${candidate}"; then
continue; continue;
fi fi
...@@ -34,9 +33,13 @@ for candidate in ${RUN_CLANG_TIDY_CANDIDATES[@]}; do ...@@ -34,9 +33,13 @@ for candidate in ${RUN_CLANG_TIDY_CANDIDATES[@]}; do
break; break;
done done
if [[ -z "${RUN_CLANG_TIDY}" ]]; then if [[ ! -v RUN_CLANG_TIDY ]]; then
echo "No run-clang-tidy executable found" echo "No run-clang-tidy executable found"
exit 1 exit 1
fi fi
${RUN_CLANG_TIDY} -p "${ROOTDIR}/compile_commands_wo_subprojects/" JOBS=$(nproc)
${RUN_CLANG_TIDY} \
-p "${ROOTDIR}/compile_commands_wo_subprojects/" \
-j "${JOBS}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment