Skip to content

Commit 58a12d1

Browse files
Bump cpp-linter from 1.6.5 to 1.7.1 (#191)
* Bump cpp-linter from 1.6.5 to 1.7.0 Bumps [cpp-linter](https://github.com/cpp-linter/cpp-linter) from 1.6.5 to 1.7.0. - [Release notes](https://github.com/cpp-linter/cpp-linter/releases) - [Commits](cpp-linter/cpp-linter@v1.6.5...v1.7.0) --- updated-dependencies: - dependency-name: cpp-linter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * update action inputs * doc updated action inputs * add pictures of PR review in action * bump cpp-linter to v1.7.1 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brendan <[email protected]>
1 parent ca16ecb commit 58a12d1

File tree

6 files changed

+50
-7
lines changed

6 files changed

+50
-7
lines changed

README.md

+33-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ jobs:
104104

105105
#### `verbosity`
106106

107-
- **Description**: This controls the action's verbosity in the workflow's logs. Supported options are defined by the [python logging library's log levels](https://docs.python.org/3/library/logging.html#logging-levels). This option does not affect the verbosity of resulting thread comments or file annotations.
108-
- Default: '10'
107+
- **Description**: This controls the action's verbosity in the workflow's logs. Supported options are `info` or `debug`. This option does not affect the verbosity of resulting thread comments or file annotations.
108+
- The verbosity can also be engaged by enabling debug logs when [re-running jobs or workflows](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs).
109+
- Default: 'info'
109110

110111
#### `lines-changed-only`
111112

@@ -174,6 +175,24 @@ jobs:
174175
- **Description**: A string of extra arguments passed to clang-tidy for use as compiler arguments (like `-std=c++14 -Wall`).
175176
- Default: ''
176177

178+
#### `tidy-review`
179+
180+
**Beta feature** 🚧
181+
182+
- **Description**: Set this option to true to enable pull request reviews from clang-tidy.
183+
- To use Pull Request reviews, the `GITHUB_TOKEN` (provided by Github to each repository) must be declared as an environment
184+
variable. See [Authenticating with the GITHUB_TOKEN](https://docs.github.com/en/actions/reference/authentication-in-a-workflow)
185+
- See also [the PR review feature caveats](https://cpp-linter.github.io/cpp-linter/pr_review_caveats.html)
186+
- Default: false
187+
188+
#### `format-review`
189+
190+
- **Description**: Set this option to true to enable pull request reviews from clang-format.
191+
- To use Pull Request reviews, the `GITHUB_TOKEN` (provided by Github to each repository) must be declared as an environment
192+
variable. See [Authenticating with the GITHUB_TOKEN](https://docs.github.com/en/actions/reference/authentication-in-a-workflow)
193+
- See also [the PR review feature caveats](https://cpp-linter.github.io/cpp-linter/pr_review_caveats.html)
194+
- Default: false
195+
177196
### Outputs
178197

179198
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.
@@ -208,6 +227,18 @@ The total number of concerns raised by clang-format only.
208227

209228
![step summary](https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/step-summary.png)
210229

230+
### Pull Request Review
231+
232+
Using only clang-tidy (`tidy-review`):
233+
234+
![sample tidy-review](https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/tidy-review.png)
235+
236+
Using only clang-format (`format-review`):
237+
238+
![sample format-review](https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/format-review.png)
239+
240+
![sample tidy-review](https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/format-suggestion.png)
241+
211242
<!--footer-start-->
212243

213244
## Add C/C++ Linter Action badge in README

action.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ inputs:
6262
required: false
6363
default: "12"
6464
verbosity:
65-
description: A hidden option to control the action's log verbosity. This is the `logging` level (defaults to DEBUG).
65+
description: A hidden option to control the action's log verbosity. This is the `logging` level (defaults to `info`).
6666
required: false
67-
default: "10"
67+
default: info
6868
lines-changed-only:
6969
description: Set this option to 'true' to only analyze changes in the event's diff. Defaults to 'false'.
7070
required: false
@@ -99,6 +99,14 @@ inputs:
9999
description: A string of extra arguments passed to clang-tidy for use as compiler arguments. Multiple arguments are separated by spaces so the argument name and value should use an '=' sign instead of a space.
100100
required: false
101101
default: ""
102+
tidy-review:
103+
description: Set this to true to enable PR reviews from clang-tidy. See also https://cpp-linter.github.io/cpp-linter/pr_review_caveats.html
104+
required: false
105+
default: false
106+
format-review:
107+
description: Set this to true to enable PR reviews from clang-format.See also https://cpp-linter.github.io/cpp-linter/pr_review_caveats.html
108+
required: false
109+
default: false
102110
outputs:
103111
checks-failed:
104112
description: An integer that can be used as a boolean value to indicate if any checks failed by clang-tidy and clang-format.
@@ -166,7 +174,9 @@ runs:
166174
--ignore="${{ inputs.ignore }}" \
167175
--database=${{ inputs.database }} \
168176
--file-annotations=${{ inputs.file-annotations }} \
169-
--extra-arg="${{ inputs.extra-args }}"
177+
--extra-arg="${{ inputs.extra-args }}" \
178+
--tidy-review="${{ inputs.tidy-review }}" \
179+
--format-review="${{ inputs.format-review }}"
170180
171181
- name: Setup python venv (Windows)
172182
if: runner.os == 'Windows'
@@ -199,6 +209,8 @@ runs:
199209
' --ignore="${{ inputs.ignore }}"' +
200210
' --database=${{ inputs.database }}' +
201211
' --file-annotations=${{ inputs.file-annotations }}' +
202-
' --extra-arg="${{ inputs.extra-args }}"'
212+
' --extra-arg="${{ inputs.extra-args }}"' +
213+
' --tidy-review="${{ inputs.tidy-review }}"' +
214+
' --format-review="${{ inputs.format-review }}"'
203215
204216
Invoke-Expression -Command $app

docs/images/format-review.png

26.5 KB
Loading

docs/images/format-suggestion.png

32.7 KB
Loading

docs/images/tidy-review.png

59.4 KB
Loading

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ clang-tools==0.11.1
44

55
# cpp-linter core Python executable package
66
# For details please see: https://github.com/cpp-linter/cpp-linter
7-
cpp-linter==1.6.5
7+
cpp-linter==1.7.1

0 commit comments

Comments
 (0)