Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72547

Add option to disable annotation publishing to SCM provider

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-ng-plugin
    • None

      Currently there is an option to `skipPublishingChecks` completely, however sometimes there is a need to skip just annotation publishing. For example, consider such pipeline:

       

      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(),
                      checkStyle()
                     ])
                  recordIssues(tools: [
                      taskScanner(highTags: '@Deprecated', normalTags:'FIXME', lowTags:'TODO', includePattern: '**/*.java, **/*.properties, **/*.xml', excludePattern: 'target/**/*')
                    ])
              }
          }
      } 

       

       

      If Jenkins is integrated with GitHub this will produce annotation on the source code for both Checkstyle and Open Tasks Scanner, however Open Tasks Scanner annotations are just duplicates of what's already in the code:

      There is no need for them as annotations. But I would still like to keep Checkstyle annotations published.

      I would like and option which skips just annotation publishing. I'm not sure if it's best to do it as a separate option, or if current `skipPublishingChecks` can be adjusted be a choice of `none`, `annotations`, `all`. Either way that would be very useful.

            drulli Ulli Hafner
            vilius Vilius
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: