Skip to content

Commit

Permalink
Allow clang-format versions down to 7
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlocke committed Jul 26, 2023
1 parent ccb0cff commit aec3df8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Format/format_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exit_with_message() {
}

exit_with_clang_format_install_message() {
exit_with_message "Skipping code formatting. Please install clang-format version 16 or greater: 'brew install clang-format'"
exit_with_message "Skipping code formatting. Please install clang-format version 7 or greater: 'brew install clang-format'"
}

if ! [ -x "$(command -v clang-format)" ]; then
Expand All @@ -27,8 +27,7 @@ fi

clang_format_version="$(clang-format --version | cut -f3 -w | tail)"
clang_format_version_major=$(awk -F. '{print $1}' <<<"$clang_format_version")

if [ "$clang_format_version_major" -lt 16 ]; then
if [ "$clang_format_version_major" -lt 7 ]; then
exit_with_clang_format_install_message
fi

Expand Down

0 comments on commit aec3df8

Please sign in to comment.