From e523a0256a2514a5b52d67a20d2f4759509772b4 Mon Sep 17 00:00:00 2001
From: Valentin Lorentz <vlorentz@softwareheritage.org>
Date: Wed, 5 Mar 2025 16:49:48 +0100
Subject: [PATCH] Run pre-commit with flag --show-diff-on-failure

It helps see what changes need to be applied.

Additionally, this will help be debug a case where black on Jenkins
wants to change a file, but it does not locally.
---
 jobs/templates/swh-pipeline.groovy.j2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jobs/templates/swh-pipeline.groovy.j2 b/jobs/templates/swh-pipeline.groovy.j2
index 982ddad..7395030 100644
--- a/jobs/templates/swh-pipeline.groovy.j2
+++ b/jobs/templates/swh-pipeline.groovy.j2
@@ -71,7 +71,7 @@ pipeline {
       parallel {
         stage ('Code quality') {
           steps {
-            sh '''SKIP={{precommit_skip_checks}} pre-commit run --all-files'''
+            sh '''SKIP={{precommit_skip_checks}} pre-commit run --all-files --show-diff-on-failure'''
           }
         }
         stage ('mypy') {
-- 
GitLab