Skip to content

STYLE: Mark the sources for the ITK style checks and format them - #3

Merged
vboussot merged 1 commit into
mainfrom
style-clang-format
Oct 3, 2026
Merged

vboussot merged 1 commit into
mainfrom
style-clang-format

Conversation

@vboussot

@vboussot vboussot commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

The clang-format linter (ITKClangFormatLinterAction@main) now fails when no tracked file carries hooks.style=clangformat. This repository had no .gitattributes, so the check had been passing without reading a file, and it is red on every branch today.

  • .gitattributes marks *.h, *.hxx and *.cxx the way ITK marks its own sources.
  • The 26 files the linter then flags are formatted with clang-format 19.1.7 and the module's own .clang-format.

The reformat changes whitespace and line breaks only: each file is byte-identical to its previous version once spaces, tabs and newlines are removed. SortIncludes is Never, so no include moves. Every header still compiles on its own.

The clang-format linter action now fails when no tracked file carries
hooks.style=clangformat; without a .gitattributes it had been passing
without checking a file. Mark the C++ sources as ITK marks its own and
apply clang-format 19.1.7 with the module's .clang-format: whitespace
and line breaks only.
@vboussot
vboussot merged commit fe8ba8f into main Oct 3, 2026
5 checks passed
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.

1 participant