Add cpp-linter action#3
Conversation
|
@seiko2plus do you think this is good enough, or do you think we should set up |
There was a problem hiding this comment.
Pull Request Overview
Adds a C++ linting step to CI and ensures consistent formatting with NumPy’s .clang-format.
- Introduces a GitHub Actions workflow (
cpp-linter.yml) that runs a C++ linter on changes undernpsr/. - Adds a
.clang-formatfile mirroring NumPy’s style for uniform code formatting.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/cpp-linter.yml | New CI workflow to run a C++ linter via the cpp-linter-action. |
| .clang-format | Clang-Format configuration based on NumPy’s style guidelines. |
Comments suppressed due to low confidence (1)
.clang-format:28
- The regex for matching angled includes uses a closing quote (
") instead of a closing angle bracket (>). It should be^<[[:alnum:]_.]+>to properly match<header>patterns.
- Regex: '^<[[:alnum:]_.]+'"
| style: "file" | ||
|
|
||
| - name: Linter Outputs | ||
| if: steps.linter.outputs.checks-failed != 0 |
There was a problem hiding this comment.
GitHub Actions outputs are treated as strings; comparing checks-failed to an unquoted number may always evaluate to true. Use != '0' or compare as a string to correctly detect failures.
| if: steps.linter.outputs.checks-failed != 0 | |
| if: steps.linter.outputs.checks-failed != '0' |
This uses the same .clang-format as numpy for consistency.
|
I followed google style without any modifications in #1 to match with Highway, but its okay to reformat it.. I just followed Highway because I thought that's maybe its better to target Highway community in case of there's need to move/share any code.. |
For now its fine to me.. I just add it spin within #1, with support of spin commands ( |
|
@Mousius, Thank you! |
This uses the same .clang-format as numpy for consistency.