Skip to content

COMP: Restore the clang-format lint check - #79

Merged
hjmjohnson merged 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:lint-clang-format-main
Nov 3, 2026
Merged

hjmjohnson merged 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:lint-clang-format-main

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

Restores the lint job: ITKClangFormatLinterAction@master no longer resolves (the action's default branch is main), and the action now fails unless files are marked hooks.style=clangformat. Adds that .gitattributes and applies the module's .clang-format to the four files that did not conform. This unblocks the lint check on #78.

Details
  • .github/workflows/clang-format-linter.yml: @master to @main.
  • .gitattributes: marks *.h, *.hxx, and *.cxx for the check. Since InsightSoftwareConsortium/ITKClangFormatLinterAction@fc9d6869 (2026-09-23) the action fails when no tracked file carries the attribute, instead of passing without checking anything.
  • Reformatted with clang-format 19.1.7 (ITK's pinned version) and the module's own .clang-format: src/itkOMEZarrNGFFImageIO.cxx, src/itkOMEZarrNGFFImageIOFactory.cxx, test/itkOMEZarrNGFFInMemoryTest.cxx, test/itkOMEZarrNGFFReadSliceTest.cxx. The changes are whitespace and line breaks only (git diff -w shows only re-wrapped lines).
Testing
  • The action's check (ITK's clang-format.bash, clang-format 19.1.7) passes locally on this branch.
  • git diff -w shows only re-wrapped lines; one long string literal is split into two adjacent literals, which concatenate to the same string.
  • Not built locally: the module's bundled TensorStore/Abseil does not build with the current macOS SDK on arm64, on main as well as this branch. CI builds and tests it here.

The lint job referenced ITKClangFormatLinterAction@master, which no
longer resolves since the action's default branch became main. The
action now also fails when no tracked file has the
hooks.style=clangformat attribute, so add a .gitattributes marking the
C++ sources, and apply the module's .clang-format to the four files that
did not conform. The reformat changes only whitespace and line breaks.
@hjmjohnson
hjmjohnson marked this pull request as ready for review November 3, 2026 15:23
@hjmjohnson
hjmjohnson merged commit d52dc1e into InsightSoftwareConsortium:main Nov 3, 2026
16 of 17 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.

2 participants