Skip to content

Latest commit

 

History

History
74 lines (52 loc) · 2.26 KB

README.md

File metadata and controls

74 lines (52 loc) · 2.26 KB

GitHub Action: Run cpplint with reviewdog

Docker Image CI Status Release

github-pr-check sample github-pr-review sample

This action runs cpplint with reviewdog on pull requests to improve code review experience.

Inputs

github_token

Required. Must be in form of github_token: ${{ secrets.github_token }}'.

level

Optional. Report level for reviewdog [info,warning,error]. It's same as -level flag of reviewdog. Default is error.

reporter

Reporter of reviewdog command [github-pr-check,github-pr-review]. Default is github-pr-check.

reviewdog_flags

Additional reviewdog flags. Default is ''.

flags

Optional. List of arguments to send to cpplint. Default is --extensions=h,hpp,c,cpp,cc,cu,hh,ipp.

filter

Optional. List of filter arguments to send to cpplint. Default is --filter="".

targets

Optional. List of file list arguments to send to cpplint. Default is --recursive.

Example Usage

name: Reviewdog
on: [pull_request]

jobs:
  cpplint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: reviewdog/action-cpplint@master
      with:
        github_token: ${{ secrets.github_token }}
        reporter: github-pr-review
        flags: --linelength=50 # Optional
        filter: "-readability/braces\
          ,-whitespace/braces\
          ,-whitespace/comments\
          ,-whitespace/indent\
          ,-whitespace/newline\
          ,-whitespace/operators\
          ,-whitespace/parens\
          " # Optional