chore: Format all cmake files without comments - #6294
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6294 +/- ##
=======================================
Coverage 79.9% 79.9%
=======================================
Files 839 839
Lines 65528 65528
Branches 7272 7272
=======================================
Hits 52325 52325
Misses 13203 13203 🚀 New features to boost your workflow:
|
| target_protobuf_sources( | ||
| xrpl.libpb | ||
| xrpl/proto | ||
| LANGUAGE | ||
| cpp | ||
| IMPORT_DIRS | ||
| include/xrpl/proto | ||
| PROTOS | ||
| include/xrpl/proto/xrpl.proto) |
There was a problem hiding this comment.
Here and below: This is not as nice as it was before, and much harder to follow since the connection between the keyword (e.g. LANGUAGE) and value (e.g. cpp) is lost.
Is there any way to keep the existing behavior? Curiously with the target_link_libraries lines later, the alignments seem to work well for INTERFACE).
There was a problem hiding this comment.
Was able to use custom command, seems to look better and uniform now
There was a problem hiding this comment.
Pull request overview
This PR reformats all CMake files that were previously excluded from cmake-format, applying consistent formatting with comment markup disabled to avoid disrupting comment styles.
Changes:
- Updated
.cmake-format.yamlto disable comment markup (enable_markup: false) and add custom command configuration fortarget_protobuf_sources - Removed exclusions from
.pre-commit-config.yamlto enable cmake-format on previously excluded CMake files - Reformatted 9 CMake files with consistent style (spacing, indentation, line breaks)
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.cmake-format.yaml |
Added custom command definition for target_protobuf_sources and disabled comment markup to preserve existing comment formatting |
.pre-commit-config.yaml |
Removed exclusions for CMake files to enable automatic formatting |
tests/conan/CMakeLists.txt |
Collapsed multi-line project() call to single line |
cmake/target_protobuf_sources.cmake |
Applied consistent formatting to function definition and command calls |
cmake/target_link_modules.cmake |
Applied consistent formatting with space after function/control flow keywords |
cmake/isolate_headers.cmake |
Applied consistent formatting to function definition |
cmake/add_module.cmake |
Consolidated multi-line function calls and applied consistent indentation |
cmake/XrplInstall.cmake |
Reformatted install() commands and control flow statements with consistent style |
cmake/XrplDocs.cmake |
Applied consistent formatting to functions and commands |
cmake/XrplCore.cmake |
Reformatted target definitions and library linking calls |
cmake/CodeCoverage.cmake |
Applied consistent formatting throughout with updated control flow spacing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Can we space the parentheses consistently with everything else (specifically |
I'm not sure that's possible, will take a look as a follow-up |
High Level Overview of Change
I found a way not to reformat comments, which causes ugly style in these files, so let's merge the code. This way all the actual code will be uniformly formatted.
Context of Change
Type of Change
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)