Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

action-cppcheck

Check pull request with cppcheck and post result to review comments.

Screenshot

Inputs

inputs:
github_token:
description: "action github token"required: falserepository:
description: "owner and repository name"required: truepull_request_id:
description: "pull request id"required: trueallow_approve:
description: "allow submit approve review"required: truedefault: trueenable_checks:
description: "checks to enable"required: truedefault: "all"install_cppcheck:
description: "install cppcheck by apt"required: falsedefault: truecomment_result:
description: "submit the result in a comment"required: falsedefault: true

Example

use pull_request_target event

pull_request_target vs pull_request

name: cppcheckon:
pull_request_target:
types: [opened, synchronize]jobs:
cppchceck:
name: cppcheckruns-on: ubuntu-lateststeps:
- uses: actions/checkout@v2with:
ref: ${{ github.event.pull_request.head.sha }}persist-credentials: false
- uses: linuxdeepin/action-cppcheck@mainwith:
github_token: ${{ secrets.GITHUB_TOKEN }}repository: ${{ github.repository }}pull_request_id: ${{ github.event.pull_request.number }}

Allow approval

See: https://github.blog/changelog/2022-01-14-github-actions-prevent-github-actions-from-approving-pull-requests/

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages