diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-08-25 17:05:16 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-08-25 17:17:29 +0200 |
commit | 38424714b1d3c7e35fb0cb2de548338885a98c14 (patch) | |
tree | 8363b2a5c79059751edd49166657a6d1a7d27aec | |
parent | 353bb45e21fadf8da1f6fbbaaf99b8ac8acafea9 (diff) |
Print colored diffs when there are formatting failures in CI
This makes diffs more readable in CI logs.
-rwxr-xr-x | misc/scripts/black_format.sh | 2 | ||||
-rwxr-xr-x | misc/scripts/clang_format.sh | 2 | ||||
-rwxr-xr-x | misc/scripts/file_format.sh | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/misc/scripts/black_format.sh b/misc/scripts/black_format.sh index f93e8cbc2a..2ad9a23832 100755 --- a/misc/scripts/black_format.sh +++ b/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 diff --git a/misc/scripts/clang_format.sh b/misc/scripts/clang_format.sh index 63c66d41c3..bcd63aa73b 100755 --- a/misc/scripts/clang_format.sh +++ b/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 diff --git a/misc/scripts/file_format.sh b/misc/scripts/file_format.sh index 795431cd28..0b49b175f2 100755 --- a/misc/scripts/file_format.sh +++ b/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 |