Skip to content

Commit

Permalink
Merge pull request #1265 from DLR-AMR/update-indent_scripts
Browse files Browse the repository at this point in the history
Use looser indent-script condition for all indent scripts
  • Loading branch information
sandro-elsweijer authored Oct 14, 2024
2 parents aa7d761 + aca99ba commit 871a487
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/check_if_file_indented.scp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ FORMAT_OPTIONS="--dry-run --Werror --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 871a487

Please sign in to comment.