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

PHP CodeSniffer errors treated as warnings

XMLWordPrintable

    • 5.0.0 (analysis-model and warnings-ng)

      Given the following stage definition and the attached CodeSniffer output
      I was expecting to have errors reported.
      Instead I get warnings with severity HIGH

      Changing the tool from phpCodeSniffer() to checkStyle() makes no difference

      stage('CodeSniffer') {
        steps {
          sh '''
             vendor/bin/phpcs \\
             --ignore=*/vendor/*,*/node_modules/* \\
             --extensions=php \\
             --standard=phpcs.xml \\
             --bootstrap=vendor/autoload.php \\
             --report=checkstyle \\
             --report-file=phpcs.log.xml \\
             Modules/
          '''
        }
      
        post {
          always {
            recordIssues enabledForFailure: true,
            aggregatingResults: true,
            tools: [phpCodeSniffer(pattern: 'phpcs.log.xml', reportEncoding: 'UTF-8')]
          }
        }
      }
      

            tanjaro Tanja Roithmeier
            catalin_nicolescu Cătălin Nicolescu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: