Check Formatting: Reformat file with `shfmt`
@@ -4,25 +4,25 @@ echo
echo ELEKTRA CHECK FORMATTING
echo
-command -v git >/dev/null 2>&1 || { echo "git command needed for this test, aborting" >&2; exit 0; }
+command -v git > /dev/null 2>&1 || {
+ echo "git command needed for this test, aborting" >&2
+ exit 0
+}
cd "@CMAKE_SOURCE_DIR@"
-if ! git diff --exit-code
-then
+if ! git diff --exit-code; then
echo "Seems like source is already modified, aborting test" >&2
exit 0
fi
-if which clang-format-6.0 > /dev/null || which clang-format > /dev/null;
-then
+if which clang-format-6.0 > /dev/null || which clang-format > /dev/null; then
scripts/reformat-source
else
echo 'Warning: clang-format not available, skipping reformat-source'
fi
-if which sponge > /dev/null || which cmake-format > /dev/null
-then
+if which sponge > /dev/null || which cmake-format > /dev/null; then
scripts/reformat-cmake || exit 1
else
echo 'Warning: Since either `sponge` or `cmake-format` is not available I will not check the formatting of the CMake code.'
