Skip to content
Closed
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
30 changes: 30 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: format check (sub-action e2e)

on:
push:
branches: [claude/project-thread-np880h]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
format:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
# Expected: fails, with one annotation on src/demo.hpp line 44 only.
# The old mis-formatted lines in src/demo.hpp are not part of the change.
- uses: cpp-linter/cpp-linter-action/format@claude/project-thread-np880h
id: fmt
continue-on-error: true
- name: Assert
shell: bash
run: |
echo "outcome=${{ steps.fmt.outcome }} checks-failed=${{ steps.fmt.outputs.checks-failed }} version=${{ steps.fmt.outputs.clang-format-version }}"
[ "${{ steps.fmt.outcome }}" = failure ] && [ "${{ steps.fmt.outputs.checks-failed }}" = 1 ]
3 changes: 3 additions & 0 deletions src/demo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@
long diff;

};

int formattedDecl(int a);
int badly_spaced( int a );

Check failure on line 44 in src/demo.hpp

View workflow job for this annotation

GitHub Actions / format (windows-latest)

clang-format

code should be clang-formatted

Check failure on line 44 in src/demo.hpp

View workflow job for this annotation

GitHub Actions / format (windows-latest)

clang-format

code should be clang-formatted
Loading