Hi everyone. I’m using CLI in Github Actions with ...
# detekt
n
Hi everyone. I’m using CLI in Github Actions with help of setup detekt action. I just migrated from 1.21.0 to 1.22.0 and added to
detekt.yml
new
libraries
and
formatting
sections, now build doesn’t work because apparently I need to connect plugins to CLI. Part of the action to execute detekt:
Copy code
jobs:
  detekt:
    runs-on: buildjet-4vcpu-ubuntu-2004
    steps:
      - uses: actions/checkout@v3
      - name: Setup detekt
        uses: peter-murray/setup-detekt@v2
        with:
          detekt_version: 1.22.0
      - name: Run detekt
        run: detekt-cli \
          --config plugins/detekt/detekt.yml \
          --build-upon-default-config \
          --excludes '**/androidTest/**','**/build.gradle.kts'
How can I connect both
formatting
and
libraries
plugins? I’ve read the documentation, but there’s no actual example how to add the plugins.
b
You'd be much better off setting up detekt in gradle and just uploading sariff from actions
That way you have single source of truth without sacrificing anything
It would be nice if derekt gradle plugin would have a task for sariff upload though
n
Hmm, thanks, I will look into that