Skip to content

Commit

Permalink
Merge pull request #372 from dropbox/clang-format-7
Browse files Browse the repository at this point in the history
Allow clang-format versions down to 7
  • Loading branch information
julianlocke authored Jul 26, 2023
2 parents ccb0cff + aec3df8 commit 0d6f0ba
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 0d6f0ba

Please sign in to comment.