From 2805f7b36d2c09de6407355bf4569e4e5eb1dcb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 7 Apr 2023 17:44:39 +0200 Subject: CI: Visibly print trailing whitespace when static checks fail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub Actions seems to be hiding colored whitespace, and after lots of attempts I couldn't find a way to work it around. So instead I'm using a perl expression to replace trailing spaces with `ยท` and tabs with `` in the ANSI colored diff output. This ensure that they're visible, and they are properly colored as expected too. (cherry picked from commit 266280ffca218ae1c86e6d83d9b67a16086148b8) --- .github/workflows/static_checks.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/static_checks.yml b/.github/workflows/static_checks.yml index 5ec5c72656..b2ab913234 100644 --- a/.github/workflows/static_checks.yml +++ b/.github/workflows/static_checks.yml @@ -22,7 +22,8 @@ jobs: sudo apt-get install -qq dos2unix clang-format-15 libxml2-utils python3-pip moreutils sudo update-alternatives --remove-all clang-format || true sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-15 100 - sudo pip3 install black==22.3.0 pygments pytest==7.1.2 mypy==0.971 + sudo pip3 install black==22.3.0 pytest==7.1.2 mypy==0.971 + git config diff.wsErrorHighlight all - name: File formatting checks (file_format.sh) run: | -- cgit v1.2.3