]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci/linter: show diffs for ruff check when possible
authorJörg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 24 Feb 2026 17:03:54 +0000 (18:03 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 17 May 2026 17:51:41 +0000 (02:51 +0900)
.github/workflows/linter.yml

index dd89780e76e48de7192eecbca14e6879cfadbc82..048391836ebe23734aae0fe44a3ff2f634698aa2 100644 (file)
@@ -72,7 +72,12 @@ jobs:
       - name: Run ruff check
         run: |
           mkosi box -- ruff --version
-          mkosi box -- ruff check
+          if ! mkosi box -- ruff check
+          then
+              echo "Please fix the errors shown by 'ruff check' on the above files or add noqa comments where appropriate."
+              echo "Diffs for fixes that can be programmatically generated are shown below:"
+              mkosi box -- ruff check --diff
+          fi
 
       - name: Configure meson
         run: mkosi box -- env CC=clang CXX=clang++ meson setup build