GitHub Action
Run detekt with reviewdog
This action allows running detekt with reviewdog on pull requests
reviewdog_reporter: github-pr-check
github-pr-check
reporter reports results
to GitHub Checks
reviewdog_reporter: github-pr-review
github-pr-review
reporter reports results to GitHub PullRequest review comments.
This action has several inputs you may be interested in:
Required. Must be in form of github_token: ${{ secrets.github_token }}
.
Optional. Report level for reviewdog's github-pr-check
reporter [info
,warning
,error
].
It's same as -level
flag of reviewdog.
The default is error
.
Optional. Filter mode for reviewdog. [added
,diff_context
,file
,nofilter
]
It's same as -filter-mode
flag of reviewdog.
The default is added
.
Optional. Reporter for reviewdog. [github-pr-check
,github-pr-review
]
The default is github-pr-check
.
Optional. Path to the config file for detekt.
The default is default-detekt-config.yml
Optional. Globing patterns describing paths to exclude from the analysis.
The default is **/build/**,**/.idea/**
Optional. Fails the current check if any error was found [true
/false
]
The default value is true
.
Optional. Additional plugins for detekt.
Should be defined with comma separation detekt_plugins: 'path/1.jar,path/2.jar'
The default value is empty.
Optional. Provides baseline.xml file to detekt.
The default value is empty.
Optional. Executes detekt in parallel.
The default value is empty.
To enable declare detekt_parallel: true
Optional. Preconfigures detekt with a bunch of rules and some opinionated defaults
for you.
Allows additional provided configurations to override the
defaults.
To enable declare detekt_build_upon_default_config: true
Optional. Activates all available (even unstable) rules.
The default value is empty.
To enable declare detekt_all_rules: true
Following example runs detekt with
name: reviewdog
on: [ pull_request ]
jobs:
detekt:
name: Check Code Quality
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
with:
fetch-depth: 1
ref: ${{ github.head_ref }}
- name: detekt
uses: alaegin/[email protected]
with:
github_token: ${{ secrets.github_token }}
detekt_config: detekt-config.yml # Change config path
- action-ktlint - Action for running ktlint with reviewdog