ci: Extend diff context for clang-format
What changed, and why it matters
This is a minor change to Bitcoin Core's continuous integration (CI) script. It adjusts how many lines of surrounding context are shown when checking code formatting. There is no security issue here.
No security action needed. This is a routine CI maintenance change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit changes a single flag in ci/test/03_test_script.sh from git diff -U0 to git diff -U1. This increases the diff context passed to clang-format-diff.py from zero lines to one line. The stated purpose is to allow clang-format to preserve empty lines between header groups after fix_includes.py has modified includes. This is a tooling/CI formatting fix with no runtime or security implications.
Changed components
ci/test/03_test_script.shInspect captured patch +1 / −1
diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh
index c2117d7e..d81bd0b9 100755
--- a/ci/test/03_test_script.sh
+++ b/ci/test/03_test_script.sh
@@ -198,7 +198,7 @@ if [[ "${RUN_IWYU}" == true ]]; then
-Xiwyu --check_also="*/primitives/*.h" \
2>&1 | tee /tmp/iwyu_ci.out
python3 "/include-what-you-use/fix_includes.py" --nosafe_headers < /tmp/iwyu_ci.out
- git diff -U0 | ./contrib/devtools/clang-format-diff.py -binary="clang-format-${TIDY_LLVM_V}" -p1 -i -v
+ git diff -U1 | ./contrib/devtools/clang-format-diff.py -binary="clang-format-${TIDY_LLVM_V}" -p1 -i -v
}
run_iwyu "compile_commands_iwyu_errors.json"
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.