Skip to content

Add a cmake-lint action#66

Closed
derobins wants to merge 5 commits into
developfrom
derobins/cmake-lint-action
Closed

Add a cmake-lint action#66
derobins wants to merge 5 commits into
developfrom
derobins/cmake-lint-action

Conversation

@derobins
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings November 19, 2025 02:08
@derobins
Copy link
Copy Markdown
Collaborator Author

This will fail until #65 is merged

Copy link
Copy Markdown
Contributor

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.

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.

Comment thread .github/workflows/cmake-lint.yml Outdated
Comment on lines +14 to +17
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
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings November 19, 2025 02:20
This is triggering a lot of format warnings that we don't care
about.
Copy link
Copy Markdown
Contributor

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.

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.

Comment on lines +1 to +2
# Run cmake-lint over all our CMake files
# Includes CMakeLists.txt and all files in /cmake
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

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
Suggested change
# 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

Copilot uses AI. Check for mistakes.
@derobins
Copy link
Copy Markdown
Collaborator Author

Closing this for now

@derobins derobins closed this Nov 19, 2025
@derobins derobins deleted the derobins/cmake-lint-action branch November 21, 2025 19:11
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.

2 participants