Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

StructionSite/Detekt-Action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Action for running detekt with reviewdog

GitHub release (latest by date)

This action allows running detekt with reviewdog on pull requests

Examples

github-pr-check - used by default

reviewdog_reporter: github-pr-check
github-pr-check reporter reports results to GitHub Checks

Example comment made by the action with github-pr-check

github-pr-review

reviewdog_reporter: github-pr-review
github-pr-review reporter reports results to GitHub PullRequest review comments.

Example comment made by the action with github-pr-review

Inputs

This action has several inputs you may be interested in:

github_token

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

reviewdog_level

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.

reviewdog_filter

Optional. Filter mode for reviewdog. [added ,diff_context,file,nofilter]
It's same as -filter-mode flag of reviewdog.
The default is added.

Read more

reviewdog_reporter

Optional. Reporter for reviewdog. [github-pr-check,github-pr-review]
The default is github-pr-check.

Read more

detekt_config

Optional. Path to the config file for detekt.
The default is default-detekt-config.yml

Read more

detekt_excludes

Optional. Globing patterns describing paths to exclude from the analysis.
The default is **/build/**,**/.idea/**

Read more

fail_on_error

Optional. Fails the current check if any error was found [true/false]
The default value is true.

Usage

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: DominuS-RU/Detekt-Action@v1.16.0
        with:
          github_token: ${{ secrets.github_token }}
          detekt_config: detekt-config.yml # Change config path

License

MIT

Inspiration

Packages

No packages published

Languages

  • Dockerfile 64.8%
  • Shell 35.2%