Skip to content

COMP: Remove KWStyle style checking - #2578

Merged
blowekamp merged 1 commit into
SimpleITK:mainfrom
blowekamp:remove-kwstyle
Apr 30, 2026
Merged

blowekamp merged 1 commit into
SimpleITK:mainfrom
blowekamp:remove-kwstyle

Conversation

@blowekamp

Copy link
Copy Markdown
Member

KWStyle support was added in 2010 but has never been actively used. The project now uses clang-format (via pre-commit) for C++ style enforcement, making KWStyle fully redundant.

Changes

  • Remove Utilities/KWStyle/ directory and all its files
  • Remove the unconditional include() of KWStyle.cmake from CMakeLists.txt
  • Remove the hooks.style=KWStyle,uncrustify attribute from .gitattributes

Note: The ITK_USE_KWSTYLE=OFF flags in the SuperBuild and FetchContent ITK configurations are intentionally kept, as ITK itself still supports KWStyle and we want to ensure it is disabled when building ITK as a dependency.

KWStyle support was added in 2010 but has never been actively used.
The project now uses clang-format (via pre-commit) for C++ style
enforcement, making KWStyle fully redundant.

Remove:
- Utilities/KWStyle/ directory and all its files
- The unconditional include() of KWStyle.cmake in CMakeLists.txt
- The hooks.style=KWStyle,uncrustify attribute from .gitattributes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the legacy KWStyle-based style checking infrastructure from the build and repository metadata, aligning style enforcement with the existing clang-format + pre-commit workflow.

Changes:

  • Remove Utilities/KWStyle/ (KWStyle config/templates and the CMake integration module).
  • Stop including Utilities/KWStyle/KWStyle.cmake from the top-level CMakeLists.txt.
  • Remove hooks.style=KWStyle,uncrustify attributes from .gitattributes.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Utilities/KWStyle/SITKOverwrite.txt Removes KWStyle overwrite configuration.
Utilities/KWStyle/SITKFiles.txt.in Removes KWStyle file list template.
Utilities/KWStyle/SITK.kws.xml.in Removes KWStyle XML rules template.
Utilities/KWStyle/KWStyle.cmake Removes KWStyle discovery/configuration and related targets/tests.
CMakeLists.txt Removes unconditional KWStyle include from the build.
.gitattributes Drops KWStyle/uncrustify style hook attributes for C/C++ extensions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@blowekamp
blowekamp merged commit d8948b5 into SimpleITK:main Apr 30, 2026
14 checks passed
@blowekamp
blowekamp deleted the remove-kwstyle branch September 9, 2026 12:56
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.

4 participants