Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format_nix: Add version check for uncrustify #3028

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions script/format_nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ then
exit 1
fi

# Extract the version number.
VERSION=$(uncrustify --version 2>/dev/null | sed -E 's/Uncrustify-([0-9]+\.[0-9]+).*/\1/')
REQUIRED_VERSION="0.72"

if [ "$VERSION" != "$REQUIRED_VERSION" ]; then
echo "ERROR: uncrustify version $REQUIRED_VERSION is required, but found $VERSION."
exit 1
fi

# Change directory to top of repository.
cd `dirname $0`
cd ../
Expand Down