Skip to content

Commit

Permalink
Merge pull request #1258 from DLR-AMR/enhancement-clang-format_version
Browse files Browse the repository at this point in the history
Allow more clang-format versions
  • Loading branch information
sandro-elsweijer authored Oct 2, 2024
2 parents 2bf15fd + ff2de8f commit aabd814
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/t8indent
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ FORMAT_OPTIONS="-i --style=file"
# Required version of the clang format program.
REQUIRED_VERSION_MAJOR="17"
REQUIRED_VERSION_MINOR="0"
REQUIRED_VERSION_PATCH="1"
REQUIRED_VERSION_STRING="${REQUIRED_VERSION_MAJOR}.${REQUIRED_VERSION_MINOR}.${REQUIRED_VERSION_PATCH}"
REQUIRED_VERSION_STRING="${REQUIRED_VERSION_MAJOR}.${REQUIRED_VERSION_MINOR}"

FORMAT=`which clang-format 2> /dev/null`

Expand All @@ -52,7 +51,7 @@ MAJOR=`echo $VERSION | cut -d. -f1`
MINOR=`echo $VERSION | cut -d. -f2`
PATCH=`echo $VERSION | cut -d. -f3`

if [[ "$MAJOR" != "$REQUIRED_VERSION_MAJOR" || $MINOR != "$REQUIRED_VERSION_MINOR" || $PATCH != "$REQUIRED_VERSION_PATCH" ]]; then
if [[ "$MAJOR" != "$REQUIRED_VERSION_MAJOR" || $MINOR != "$REQUIRED_VERSION_MINOR" ]]; then
echo "Please install clang-format version $REQUIRED_VERSION_STRING"
exit 1
fi
Expand Down

0 comments on commit aabd814

Please sign in to comment.