diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-04-07 17:44:39 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-04-07 17:44:39 +0200 |
commit | 2805f7b36d2c09de6407355bf4569e4e5eb1dcb1 (patch) | |
tree | 0cedfdca1233a06b76aa0ab363b8ee5430a5827c /.github/workflows/static_checks.yml | |
parent | 589c32ec557edbe53c0ab7f0bf45058a7340b5ba (diff) |
CI: Visibly print trailing whitespace when static checks fail
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 `<TAB>` 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)
Diffstat (limited to '.github/workflows/static_checks.yml')
-rw-r--r-- | .github/workflows/static_checks.yml | 3 |
1 files changed, 2 insertions, 1 deletions
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: | |