Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IP
elsa
Commits
99efd44f
Commit
99efd44f
authored
Mar 11, 2020
by
Jens Petit
Browse files
Fix clang-format script (
#53
)
parent
545fca49
Pipeline
#224033
passed with stages
in 33 minutes and 7 seconds
Changes
1
Pipelines
7
Hide whitespace changes
Inline
Side-by-side
tools/ci_scripts/clang-format-test.sh
View file @
99efd44f
...
...
@@ -9,12 +9,19 @@ if [ ! -z "$(git status --untracked-files=no --porcelain)" ]; then
fi
echo
echo
"Checking formatting using the following clang-format version:"
clang-format
--version
if
type
clang-format-8 2>/dev/null
;
then
echo
"Checking formatting using the following clang-format version:"
clang-format-8
--version
else
echo
"clang-format-8 not correctly installed"
exit
1
fi
echo
# perform clang-format on all cpp-files
find elsa/
-name
'*.h'
-or
-name
'*.hpp'
-or
-name
'*.cpp'
-or
-name
'*.cu'
-or
-name
'*.cuh'
| xargs clang-format
-i
-style
=
file
$1
find elsa/
-name
'*.h'
-or
-name
'*.hpp'
-or
-name
'*.cpp'
-or
-name
'*.cu'
-or
-name
'*.cuh'
| xargs clang-format
-8
-i
-style
=
file
$1
# check if something was modified
notcorrectlist
=
`
git status
--porcelain
|
grep
'^ M'
|
cut
-c4-
`
...
...
@@ -28,7 +35,7 @@ else
git diff
--stat
$notcorrectlist
echo
"Please run"
echo
echo
"find elsa/ -name '*.h' -or -name '*.hpp' -or -name '*.cpp' -or -name '*.cu' -or -name '*.cuh' | xargs clang-format -i -style=file
$1
"
echo
"find elsa/ -name '*.h' -or -name '*.hpp' -or -name '*.cpp' -or -name '*.cu' -or -name '*.cuh' | xargs clang-format
-8
-i -style=file
$1
"
echo
echo
"to solve the issue."
# cleanup changes in git
...
...
Write
Preview
Markdown
is supported
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