Skip to content

Scan with Detekt

Scan with Detekt #167

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow performs a static analysis of your Kotlin source code using
# Detekt.
#
# Scans are triggered:
# 1. On every push to default and protected branches
# 2. On every Pull Request targeting the default branch
# 3. On a weekly schedule
# 4. Manually, on demand, via the "workflow_dispatch" event
#
# The workflow should work with no modifications, but you might like to use a
# later version of the Detekt CLI by modifing the $DETEKT_RELEASE_TAG
# environment variable.
name: Scan with Detekt
on:
# Triggers the workflow on push or pull request events but only for default and protected branches
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '21 20 * * 0'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
detekt:
runs-on: ubuntu-latest
steps:
- name: "checkout"
uses: actions/checkout@v2
- name: "detekt"
uses: natiginfo/action-detekt-all@1.23.1
with:
args: --config config/detekt/detekt.yml