Skip to content

Upgrade clang-format from version 8.0.0 to 19.1.4#1290

Merged
N-Dekker merged 5 commits intomainfrom
Remove-clang-format-version-8
Feb 11, 2025
Merged

Upgrade clang-format from version 8.0.0 to 19.1.4#1290
N-Dekker merged 5 commits intomainfrom
Remove-clang-format-version-8

Conversation

@N-Dekker
Copy link
Copy Markdown
Member

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 😃

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
Reverted commits:
- 31af828 "CI:ClangFormat_output"
- 9b37f88 "STYLE:Add_Git_pre_commit_hook"
by Viktor van der Valk, 13 Jan 2021.

Preparing to upgrade clang-format, and renew the way the pre-commit hook is installed.
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.
@thewtex thewtex requested a review from Copilot February 11, 2025 15:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@N-Dekker N-Dekker merged commit 4ae8c89 into main Feb 11, 2025
@N-Dekker N-Dekker deleted the Remove-clang-format-version-8 branch February 11, 2025 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.

3 participants