2
0
Эх сурвалжийг харах

Print colored diffs when there are formatting failures in CI

This makes diffs more readable in CI logs.
Hugo Locurcio 4 жил өмнө
parent
commit
38424714b1

+ 1 - 1
misc/scripts/black_format.sh

@@ -15,7 +15,7 @@ PY_FILES=$(find \( -path "./.git" \
                 \) -print)
 black -l 120 $PY_FILES
 
-git diff > patch.patch
+git diff --color > patch.patch
 
 # If no patch has been generated all is OK, clean up, and exit.
 if [ ! -s patch.patch ] ; then

+ 1 - 1
misc/scripts/clang_format.sh

@@ -40,7 +40,7 @@ while IFS= read -rd '' f; do
     done
 done
 
-git diff > patch.patch
+git diff --color > patch.patch
 
 # If no patch has been generated all is OK, clean up, and exit.
 if [ ! -s patch.patch ] ; then

+ 1 - 1
misc/scripts/file_format.sh

@@ -42,7 +42,7 @@ while IFS= read -rd '' f; do
     perl -i -ple 's/\s*$//g' "$f"
 done
 
-git diff > patch.patch
+git diff --color > patch.patch
 
 # If no patch has been generated all is OK, clean up, and exit.
 if [ ! -s patch.patch ] ; then