Warning-NG disable annotations

We are using Warning NG plugin with GitHub Checks plugin to send these checks and their details to GitHub UI. Our pipeline is simple:

pipeline {
  agent any
  stages {
    stage('Build distribution package') {
      steps {
        discoverGitReferenceBuild()
        withMaven() {
          sh "$MVN_CMD clean package"
        }
      }
    }
  }
    post {
        always {
            recordIssues(qualityGates: [[threshold: 1, type: 'NEW', unstable: false]], tools: [
                mavenConsole(),
                java(),
              ])
            recordIssues(tools: [
                taskScanner(highTags: '@Deprecated', normalTags:'FIXME', lowTags:'TODO', includePattern: '**/*.java, **/*.properties, **/*.xml', excludePattern: 'target/**/*')
              ])
        }
    }
}

The end result looks pretty standard:

Now the problem is that Open Tasks Scanner extension of the Warning NG plugin automatically generates annotations and attaches them in the PR source code.

Is there a way to disable source code annotations (or at least do not send them to GitHub) for one Warnings extension, but keep them enabled for other extensions? In our case we don’t need source code annotations for Open Tasks Scanner, but we want those annotations for Code Coverage and other code analysis tools.

Currently, you only have the option to disable the whole checks output. You can also show either all warnings or only new warnings. But there is no option yet, to skip all of the annotations. But this shouldn’t be hard to implement (if you want to provide a PR). I offer such an option in my standalone GitHub quality-monitor action.

Do you mean that there is an option to disable check output into GitHub UI, but still run recordIssues() for the display in the Jenkins UI? If yes, can this be disabled per Warning NG analysis format, i.e. enabled for some formats, but disabled for others?

I have looked at your quality-monitor and it is inspiring! Sadly I’m not really good at Java or Jenkins Plugin source codes :expressionless: .

Do you think filling this as a feature request on issues.jenkins.io makes sense?

Do you mean that there is an option to disable check output into GitHub UI, but still run recordIssues() for the display in the Jenkins UI? If yes, can this be disabled per Warning NG analysis format, i.e. enabled for some formats, but disabled for others?

You can use the porperty skipPublishingChecks, see
Warnings plugin step documentation for all available parameters.

You can set this option per step call.

Do you think filling this as a feature request on issues.jenkins.io makes sense?

Yes, please open a new feature request.

Thank you @uhafner !

I saw skipPublishingChecks previously, but misunderstood what it does. I tried it, and it looks like it is a step into right direction.

For our use case though, it would still be ideal to have the a check published but without annotations, so I have created a feature request at Loading... .