Skip to content

style: group local, third-party and standard headers - #76

Merged
zhenghaoz merged 1 commit into
mainfrom
fix/include-categories
Nov 8, 2026
Merged

zhenghaoz merged 1 commit into
mainfrom
fix/include-categories

Conversation

@zhangzhenghao

@zhangzhenghao zhangzhenghao commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

  • Fix the clang-format failure in https://github.com/gorse-io/clap.cpp/actions/runs/42492306559/job/128767130580.
  • Set IncludeBlocks: Regroup and IncludeCategories to separate local, third-party, and standard/platform headers, in that order.
  • Keep implicit main-header priority 0 in the local group and recognize third-party headers in both quote and angle-bracket form, including miniaudio.
  • Format all project-owned C/C++ files with the CI-pinned clang-format 18.1.8, including the reported FFT-test line-wrapping violations. No workflow or runtime logic changes.

Verification

  • Reproduced the original formatting failure on main (5662969).
  • All 59 tracked C/C++ files pass clang-format 18.1.8 --dry-run --Werror.
  • Verified every tracked C/C++ file equals formatter output from its base revision under the new configuration.
  • An stdin probe covering main/local headers, quoted miniaudio, other third-party headers and STD headers produces exactly three ordered groups; the unsorted probe is rejected by the format check.
  • git diff --check passes. Independent read-only review found no blocking issues and confirmed include multisets/non-include content are preserved apart from whitespace.
  • Native builds/tests were not run locally for this formatting-only change; remote CI run 42493170869 passed all 9 checks on commit 713852d: clang-format, five platform build/test jobs, and three Rust jobs.

@zhenghaoz
zhenghaoz merged commit 47f02d5 into main Nov 8, 2026
9 checks passed
@zhenghaoz
zhenghaoz deleted the fix/include-categories branch November 8, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants