Add a cmake-lint action#66
Conversation
|
This will fail until #65 is merged |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new GitHub Actions workflow to perform cmake-lint checks on CMake files across the repository. The workflow integrates into the existing CI/CD pipeline alongside other linting workflows like clang-format and codespell, ensuring CMake code adheres to formatting standards.
Key Changes
- Introduces cmake-lint workflow triggered on pull requests
- Configures linting for multiple directories including hipfile, rocfile, cmake, and docs
- Uses commit-pinned actions following the repository's security best practices
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| with: | ||
| source: ". cmake docs hipfile hipfile/src/amd_detail hipfile/src/nvidia_detail hipfile/test rocfile rocfile/src rocfile/test" | ||
| exclude: "thirdparty external" | ||
| config: true |
There was a problem hiding this comment.
The with: keyword should be indented at the same level as the corresponding uses: keyword above it. Currently it has 8 spaces of indentation when it should have 6 spaces to align with the uses: on line 13.
| with: | |
| source: ". cmake docs hipfile hipfile/src/amd_detail hipfile/src/nvidia_detail hipfile/test rocfile rocfile/src rocfile/test" | |
| exclude: "thirdparty external" | |
| config: true | |
| with: | |
| source: ". cmake docs hipfile hipfile/src/amd_detail hipfile/src/nvidia_detail hipfile/test rocfile rocfile/src rocfile/test" | |
| exclude: "thirdparty external" | |
| config: true |
This is triggering a lot of format warnings that we don't care about.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Run cmake-lint over all our CMake files | ||
| # Includes CMakeLists.txt and all files in /cmake |
There was a problem hiding this comment.
The comment incorrectly describes the scope of directories being linted. It states "Includes CMakeLists.txt and all files in /cmake" but the actual source parameter includes many more directories: cmake, docs, hipfile, hipfile/src/amd_detail, hipfile/src/nvidia_detail, hipfile/test, rocfile, rocfile/src, and rocfile/test.
Consider updating the comment to accurately reflect what's being linted, for example:
# Run cmake-lint over all CMake files in the repository
# Includes root CMakeLists.txt and all files in cmake/, docs/, hipfile/, and rocfile/ directories
| # Run cmake-lint over all our CMake files | |
| # Includes CMakeLists.txt and all files in /cmake | |
| # Run cmake-lint over all CMake files in the repository | |
| # Includes root CMakeLists.txt and all files in cmake/, docs/, hipfile/, and rocfile/ directories |
|
Closing this for now |
No description provided.