Unverified Commit fe9bf657 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony Committed by GitHub
Browse files

Merge pull request #28404 from mantidproject/Parallel_clang_format

Makes clang-format parallel where possible
parents 74620f29 f3cf4a4e
......@@ -22,12 +22,19 @@ if [ "$(git config user.email)" == "" ]; then
git config user.email "mantid-buildserver@mantidproject.org"
# 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 {}"
echo "Using xargs"
runner="xargs ${CLANG_FORMAT} -i"
# format
${CLANG_FORMAT} -i $sources
find Framework MantidPlot qt \( -name '*.cpp' -o -name '*.h' -o -name '*.tcc' \) | ${runner}
git add -A
if git diff --cached --quiet
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