From 56750c4f87d089c6a3f093eb2bf2edd07170d4a8 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 17 Dec 2025 20:29:36 +0000 Subject: [PATCH] iwyu, clang-format: Sort includes --- ci/test/00_setup_env_native_iwyu.sh | 2 +- ci/test/03_test_script.sh | 1 + src/.clang-format | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/test/00_setup_env_native_iwyu.sh b/ci/test/00_setup_env_native_iwyu.sh index dbb45ed7dae..3868510d43a 100755 --- a/ci/test/00_setup_env_native_iwyu.sh +++ b/ci/test/00_setup_env_native_iwyu.sh @@ -10,7 +10,7 @@ export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" # To build codegen, CMak export CONTAINER_NAME=ci_native_iwyu export TIDY_LLVM_V="21" export APT_LLVM_V="${TIDY_LLVM_V}" -export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libcapnp-dev capnproto" +export PACKAGES="clang-${TIDY_LLVM_V} clang-format-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libcapnp-dev capnproto" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index 32739a139f8..9bfa2bb10f4 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -226,6 +226,7 @@ if [[ "${RUN_IWYU}" == true ]]; then -Xiwyu --max_line_length=160 \ 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 } run_iwyu "compile_commands_iwyu_errors.json" diff --git a/src/.clang-format b/src/.clang-format index c5fcd0b48cf..4db09138556 100644 --- a/src/.clang-format +++ b/src/.clang-format @@ -97,7 +97,7 @@ ForEachMacros: - BOOST_FOREACH IfMacros: - KJ_IF_MAYBE -IncludeBlocks: Preserve +IncludeBlocks: Regroup IncludeCategories: - Regex: '^' Priority: -1