Skip to content

Commit

Permalink
update cpp-linter dependency to v1.6.2
Browse files Browse the repository at this point in the history
resolves #168

adds 2 new output variables:
- clang-tidy-checks-failed
- clang-format-checks-failed
  • Loading branch information
2bndy5 committed Dec 4, 2023
1 parent 37462e1 commit 2f2db6c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,19 @@ jobs:

### Outputs

This action creates 1 output variable named `checks-failed`. Even if the linting checks fail for source files this action will still pass, but users' CI workflows can use this action's output to exit the workflow early if that is desired.
This action creates 3 output variables. Even if the linting checks fail for source files this action will still pass, but users' CI workflows can use this action's outputs to exit the workflow early if that is desired.

#### `checks-failed`

The total number of concerns raised by both clang-format and clang-tidy.

#### `clang-tidy-checks-failed`

The total number of concerns raised by clang-tidy only.

#### `clang-format-checks-failed`

The total number of concerns raised by clang-format only.

## Example

Expand Down
8 changes: 7 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,14 @@ inputs:
default: ""
outputs:
checks-failed:
description: An integer that can be used as a boolean value to indicate if all checks failed.
description: An integer that can be used as a boolean value to indicate if any checks failed by clang-tidy and clang-format.
value: ${{ steps.cpp-linter.outputs.checks-failed }}
clang-tidy-checks-failed:
description: An integer that can be used as a boolean value to indicate if any checks failed by clang-tidy only.
value: ${{ steps.cpp-linter.outputs.clang-tidy-checks-failed }}
clang-format-checks-failed:
description: An integer that can be used as a boolean value to indicate if any checks failed by clang-format only.
value: ${{ steps.cpp-linter.outputs.clang-format-checks-failed }}
runs:
using: "composite"
steps:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ clang-tools==0.9.0

# cpp-linter core Python executable package
# For details please see: https://github.com/cpp-linter/cpp-linter
cpp-linter==1.6.1
cpp-linter==1.6.2

0 comments on commit 2f2db6c

Please sign in to comment.