Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
fe9bf657
Unverified
Commit
fe9bf657
authored
Mar 23, 2020
by
Gigg, Martyn Anthony
Committed by
GitHub
Mar 23, 2020
Browse files
Merge pull request #28404 from mantidproject/Parallel_clang_format
Makes clang-format parallel where possible
parents
74620f29
f3cf4a4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
buildconfig/Jenkins/clangformat
View file @
fe9bf657
...
...
@@ -22,12 +22,19 @@ if [ "$(git config user.email)" == "" ]; then
git config user.email
"mantid-buildserver@mantidproject.org"
fi
# sources to format
sources
=
`
find Framework MantidPlot qt
\(
-name
'*.cpp'
-o
-name
'*.h'
-o
-name
'*.tcc'
\)
`
sha
=
`
git rev-parse
--short
HEAD
`
if
[
-x
"
$(
command
-v
parallel
)
"
]
;
then
echo
"Using GNU parallel"
runner
=
"parallel
${
CLANG_FORMAT
}
-i {}"
else
echo
"Using xargs"
runner
=
"xargs
${
CLANG_FORMAT
}
-i"
fi
# format
${
CLANG_FORMAT
}
-i
$sources
find Framework MantidPlot qt
\(
-name
'*.cpp'
-o
-name
'*.h'
-o
-name
'*.tcc'
\)
|
${
runner
}
git add
-A
echo
if
git diff
--cached
--quiet
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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