What events trigger your workflow?
What OS does your workflow use?
How is cpp-linter-action configured?
- name: Format check
uses: cpp-linter/cpp-linter-action@v2.17.0
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
tidy-checks: '-*'
version: '22'
step-summary: true
lines-changed-only: true
format-review: true
passive-reviews: true
thread-comments: update
verbosity: debug
What was the unexpected behavior?
In case I have changed only single line (or several lines but not adjacent). For example, lines 42 and 100 in .cpp file. Broken formatting will not be detected on such lines. Checks return zero statuses:
INFO:CPP Linter:0 clang-format-checks-failed
INFO:CPP Linter:0 clang-tidy-checks-failed
INFO:CPP Linter:0 checks-failed
If I do changes in 2 or more adjacent lines (e.g. 42 and 43) invalid formatting will be detected correctly.
Works fine when only single line is changed but lines-changed-only set to diff.
Seems the problem arises when we have same numbers on --lines option to clang-format. E.g.:
--lines=42:42 --lines=100:100
Checked with old clang-format 18.1.8 as well. Same issue
What events trigger your workflow?
What OS does your workflow use?
How is cpp-linter-action configured?
What was the unexpected behavior?
In case I have changed only single line (or several lines but not adjacent). For example, lines 42 and 100 in .cpp file. Broken formatting will not be detected on such lines. Checks return zero statuses:
If I do changes in 2 or more adjacent lines (e.g. 42 and 43) invalid formatting will be detected correctly.
Works fine when only single line is changed but
lines-changed-onlyset todiff.Seems the problem arises when we have same numbers on
--linesoption to clang-format. E.g.:Checked with old clang-format 18.1.8 as well. Same issue