We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a18171 commit 02d6227Copy full SHA for 02d6227
1 file changed
runformat
@@ -36,4 +36,16 @@ if [[ "$DETECTED_VERSION" != "${UNCRUSTIFY_VERSION}" ]]; then
36
die "Expected Uncrustify ${UNCRUSTIFY_VERSION}."
37
fi
38
39
-$UNCRUSTIFY -c .uncrustify.cfg --no-backup *.cpp *.h
+# Run formatter
40
+echo "Running formatter..."
41
+$UNCRUSTIFY -c .uncrustify.cfg -l CPP --no-backup --replace *.cpp *.h
42
+
43
+# Show diff and fail if changes exist
44
+echo "Checking for formatting changes..."
45
+git diff --exit-code || {
46
+ echo
47
+ echo "Formatting changes were applied. Please review and commit."
48
+ exit 1
49
+}
50
51
+echo "Formatting is clean."
0 commit comments