Upgrade clang-format from version 8.0.0 to 19.1.4#1290
Merged
Conversation
Dropped https://github.com/DoozyX/clang-format-lint-action in order to upgrade to clang-format 19.1.4, following ITK pull request InsightSoftwareConsortium/ITK#5015 Reverts commit 8ac0413, "STYLE: add clang format check", by Viktor van der Valk, 11 Dec 2020. Note: there is a pull request to add clang-format 19 to DoozyX/clang-format-lint-action, by Darrel Griët: DoozyX/clang-format-lint-action#82
Following ITK pull request InsightSoftwareConsortium/ITK#5015 commit InsightSoftwareConsortium/ITK@98f0ffa "STYLE: Update .clang-format config version 19.1.4", Hans Johnson, Dec 6, 2024.
On Git Bash:
find . -regex '.*\.\(h\|hxx\|cxx\)' -exec /path/to/clang-format.exe -style=file -i {} \;
Following ITK pull request InsightSoftwareConsortium/ITK#5015 commit InsightSoftwareConsortium/ITK@814a24c "STYLE: Rigorous style conformance with clang-format 19.1.4", Hans Johnson, Dec 6, 2024.
clang-format 19.1.4 did not handle the original nested classes correctly. So instead, this pull request simply defines `ConvertToDynamicArray` and `ConvertToStaticArray` as private static member functions.
There was a problem hiding this comment.
Copilot reviewed 121 out of 130 changed files in this pull request and generated no comments.
Files not reviewed (9)
- .githooks/pre-commit: Language not supported
- .github/workflows/clang_format_check.yml: Language not supported
- Common/CostFunctions/itkAdvancedImageToImageMetric.h: Language not supported
- Common/OpenCL/Filters/itkGPUAdvancedCombinationTransformCopier.h: Language not supported
- Common/OpenCL/Filters/itkGPUInterpolatorBase.cxx: Language not supported
- Common/OpenCL/Filters/itkGPUTransformBase.cxx: Language not supported
- Common/OpenCL/Filters/itkGPUTransformCopier.h: Language not supported
- Common/OpenCL/ITKimprovements/itkGPUImage.h: Language not supported
- Common/OpenCL/ITKimprovements/itkGPUImage.hxx: Language not supported
Comments suppressed due to low confidence (1)
.clang-format:9
- The word 'faciliate' is misspelled. It should be 'facilitate'.
## Use the script Utilities/Maintenance/clang-format.bash to faciliate
thewtex
approved these changes
Feb 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removed the old pre-commit hook and the old GitHub action. Manually ran clang-format 19.1.4 on the source tree.
@thewtex Still to do: add a new pre-commit hook and a new GitHub action. Hope you can help me in a few hours from now 😃