Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BasedOnStyle: Google
25 changes: 25 additions & 0 deletions .github/workflows/cpp-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: cpp-linter

on:
pull_request:
branches:
- main
paths:
- "npsr/*"

jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: cpp-linter/cpp-linter-action@f91c446a32ae3eb9f98fef8c9ed4c7cb613a4f8a
id: linter
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: "file"

- name: Linter Outputs
if: steps.linter.outputs.checks-failed != 0
Copy link
Preview

Copilot AI Jun 9, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
if: steps.linter.outputs.checks-failed != 0
if: steps.linter.outputs.checks-failed != '0'

Copilot uses AI. Check for mistakes.

run: exit 1