Skip to content

ENH: Add clang-format version checking#5012

Merged
hjmjohnson merged 2 commits intoInsightSoftwareConsortium:masterfrom
hjmjohnson:clang-format-version-check
Dec 4, 2024
Merged

ENH: Add clang-format version checking#5012
hjmjohnson merged 2 commits intoInsightSoftwareConsortium:masterfrom
hjmjohnson:clang-format-version-check

Conversation

@hjmjohnson
Copy link
Member

Add version checking when identifying the
clang-format binaries to be used when auto
formatting ITK codebase.

Using the correct version of clang-format
is crucial for ensuring that the code
style is consistent across developers.

PR Checklist

The installation of the clang-format tools
is now performed in the file:
   Utilities/ClangFormat/DownloadClangFormat.cmake

as an ExternalProject with the target of ClangFormat.

The option for ITK_USE_CLANG_FORMAT was duplicated in
CMake/ITKModuleClangFormat.cmake
@hjmjohnson hjmjohnson added the action:ApplyClangFormat Add this label to a pull request to apply `clang-format` to the branch label Dec 4, 2024
@hjmjohnson hjmjohnson added this to the ITK 6.0 Beta 1 milestone Dec 4, 2024
@hjmjohnson hjmjohnson self-assigned this Dec 4, 2024
@github-actions github-actions bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Enhancement Improvement of existing methods or implementation labels Dec 4, 2024
@hjmjohnson hjmjohnson force-pushed the clang-format-version-check branch from a7daace to 87721c4 Compare December 4, 2024 13:23
Add version checking when identifying the
clang-format binaries to be used when auto
formatting ITK codebase.

Using the correct version of clang-format
is crucial for ensuring that the code
style is consistent across developers.
@hjmjohnson hjmjohnson force-pushed the clang-format-version-check branch from 87721c4 to 24e42fe Compare December 4, 2024 14:25
@hjmjohnson
Copy link
Member Author

related to: #4565

Copy link
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hjmjohnson hjmjohnson merged commit e65c6d9 into InsightSoftwareConsortium:master Dec 4, 2024
@hjmjohnson hjmjohnson deleted the clang-format-version-check branch December 4, 2024 21:15
@hjmjohnson hjmjohnson restored the clang-format-version-check branch February 4, 2025 23:21
@hjmjohnson hjmjohnson deleted the clang-format-version-check branch June 24, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action:ApplyClangFormat Add this label to a pull request to apply `clang-format` to the branch type:Enhancement Improvement of existing methods or implementation type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants