Skip to content

Commit

Permalink
style: Fix shellcheck issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jidicula committed Jun 9, 2024
1 parent 263da1b commit 93eaae6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ format_diff() {
local filepath="$1"
# Invoke clang-format with dry run and formatting error output
if [[ $CLANG_FORMAT_MAJOR_VERSION -gt "9" ]]; then
local_format="$(clang-format-$CLANG_FORMAT_MAJOR_VERSION \
local_format="$("clang-format-$CLANG_FORMAT_MAJOR_VERSION" \
--dry-run \
--Werror \
--style=file \
--fallback-style="$FALLBACK_STYLE" \
"${filepath}")"
else # Versions below 9 don't have dry run
formatted="$(clang-format-$CLANG_FORMAT_MAJOR_VERSION \
formatted="$("clang-format-$CLANG_FORMAT_MAJOR_VERSION" \
--style=file \
--fallback-style="$FALLBACK_STYLE" \
"${filepath}")"
Expand Down Expand Up @@ -82,7 +82,7 @@ fi
exit_code=0

# output clang-format version
clang-format-$CLANG_FORMAT_MAJOR_VERSION --version
"clang-format-$CLANG_FORMAT_MAJOR_VERSION" --version

# All files improperly formatted will be printed to the output.
src_files=$(find \
Expand Down

0 comments on commit 93eaae6

Please sign in to comment.