]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/uncrusticracy.sh
Fix HMG
[xonotic/xonotic-data.pk3dir.git] / qcsrc / uncrusticracy.sh
index 1bdd690246c15b03f1351ec90b41339dbc9411cf..c71b6cdced5c0617dab995f630416ccf20efaa87 100644 (file)
@@ -52,7 +52,12 @@ decide()
                                cat uncrustify.cfg
                                printf "%s = %s\n" "$KEY" "$choice"
                        } > uncrustify.cfg.test
-                       uncrustify -c uncrustify.cfg.test --replace --no-backup $FILES >/dev/null 2>&1
+                       UNCRUSTIFY_CONFIG=uncrustify.cfg.test sh uncrustify.sh $FILES >/dev/null 2>&1
+                       status=$?
+                       if [ $status -gt 1 ]; then
+                               echo "# ERROR: $KEY = $choice crashes with status $status."
+                               continue
+                       fi
                        score=0
                        git diff --numstat > diffstat.tmp
                        while read -r add del rest; do
@@ -123,7 +128,7 @@ while read -r LINE; do
                        out_raw
                        continue
                        ;;
-               *"#force"*)
+               *"#force"*|*"#ignore"*)
                        out_raw
                        continue
                        ;;
@@ -142,7 +147,7 @@ while read -r LINE; do
                                                decide 1 2 4 8
                                                ;;
                                        *)
-                                               decide 0 1 2 3 indent_columns
+                                               decide 0 1 2 3 indent_columns
                                                ;;
                                esac
                                out