Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Florian Fischer
emper
Commits
e45b2bc4
Commit
e45b2bc4
authored
Apr 04, 2022
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/run-clang-tidy
View file @
e45b2bc4
#!/usr/bin/env bash
set
-euo
pipefail
SCRIPTDIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&> /dev/null
&&
pwd
)
"
ROOTDIR
=
"
$(
realpath
"
${
SCRIPTDIR
}
/.."
)
"
...
...
@@ -23,9 +24,7 @@ RUN_CLANG_TIDY_CANDIDATES=(
/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
continue
;
fi
...
...
@@ -34,9 +33,13 @@ for candidate in ${RUN_CLANG_TIDY_CANDIDATES[@]}; do
break
;
done
if
[[
-z
"
${
RUN_CLANG_TIDY
}
"
]]
;
then
if
[[
!
-v
RUN_CLANG_TIDY
]]
;
then
echo
"No run-clang-tidy executable found"
exit
1
fi
${
RUN_CLANG_TIDY
}
-p
"
${
ROOTDIR
}
/compile_commands_wo_subprojects/"
JOBS
=
$(
nproc
)
${
RUN_CLANG_TIDY
}
\
-p
"
${
ROOTDIR
}
/compile_commands_wo_subprojects/"
\
-j
"
${
JOBS
}
"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment