Skip to content

Commit

Permalink
Fix version number reasoning
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbowen42 committed Nov 14, 2024
1 parent 958405c commit c7ea859
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ else
exit 0
fi

# Check if clang-format exists
# Check the major version of the provided clang-format
VERSION_STRING=$($__clang_format_executable --version)
MAJOR_VERSION=$(echo "$VERSION_STRING" | grep -oP '\d+' | head -1)

if [ "$VERSION_STRING" != "clang-format version 14.0.6" ]; then
if [ "$MAJOR_VERSION" != "14" ]; then
echo "Warning: RAJA_CLANG_FORMAT not set to a valid version number."
exit 0
fi
Expand Down

0 comments on commit c7ea859

Please sign in to comment.