From 375c654ac84128e1651567341abb93edc8e0aa61 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Sat, 21 Feb 2026 08:48:42 +0100 Subject: [PATCH 1/4] Output the required formatting changes --- .github/workflows/ruff.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 34390f38f..8bd273164 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -15,10 +15,10 @@ jobs: python -m pip install --upgrade pip pip install . --group formatting - name: Run the ruff formatter to change files - run: ruff format --check . - - name: Run ruff checks on the files - run: ruff check --fix + run: ruff format . - name: Fail if we detect any changes on the file system run: | git status git diff --exit-code + - name: Run ruff checks on the files + run: ruff check From a99623ad0a1161c87e3ff9b561b4aef7ae05b51d Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Sat, 21 Feb 2026 10:38:51 +0100 Subject: [PATCH 2/4] log changes --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index f7dd802e9..e67aac54f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -27,7 +27,7 @@ We still recommend checking out the new features and giving feedback in the repo Minor changes ~~~~~~~~~~~~~ -- ... +- Show required code changes in the CI output to help contributors solve the formatting issues. :pr:`1216` Breaking changes ~~~~~~~~~~~~~~~~ From 49baf649bdc374acc4120ccc90157a88d9d66d40 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Tue, 24 Feb 2026 10:14:16 +0000 Subject: [PATCH 3/4] output a message on how to solve badly formatted code --- .github/workflows/ruff.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 8bd273164..ff434071f 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -3,6 +3,11 @@ on: [push, pull_request] jobs: ruff: runs-on: ubuntu-latest + env: + MESSAGE: | + Your code is not formatted! + Please setup your development environment and run the formatting command. + https://icalendar.readthedocs.io/en/stable/contribute/development.html#code-format steps: - uses: actions/checkout@v6 - name: Set up Python @@ -19,6 +24,13 @@ jobs: - name: Fail if we detect any changes on the file system run: | git status - git diff --exit-code + if ! git diff --exit-code; then + echo "$MESSAGE" + exit 1; + fi - name: Run ruff checks on the files - run: ruff check + run: | + if ! ruff check; then + echo "$MESSAGE" + exit 1; + fi From 360b81efc523930d74c7bcf6756cfce591feff15 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Tue, 24 Feb 2026 11:02:37 +0000 Subject: [PATCH 4/4] Update CHANGES.rst Co-authored-by: Sashank --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9173e70c7..ad0c5660f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -27,7 +27,7 @@ We still recommend checking out the new features and giving feedback in the repo Minor changes ~~~~~~~~~~~~~ -- Show required code changes in the CI output to help contributors solve the formatting issues. :pr:`1216` +- Show required code changes in the CI output to help contributors solve the formatting issues. :pr:`1216` - Use ruff 0.15.0 for code formatting in :file:`tox.ini`. :pr:`1215` Breaking changes