• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • warnings-plugin
    • None

      Warnings regex:

      ^\s*([^:]+):([0-9]+):([^:]+):([^:]+):\s*(.*)$ 
      

      results in false positives.

      Running acceptance tests, outputs the following which is matched:

          Ubuntu
      
          ubuntu-server-1404-x64 executed in 0.14 seconds
          localhost $ scp /var/lib/jenkins/jobs/puppet-bind/workspace ubuntu-server-1404-x64:/etc/puppet/modules/bind {}
      
          ubuntu-server-1404-x64 13:48:01$ env PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-puppet/lib:${RUBYLIB}" facter  osfamily
          Debian
      

          [JENKINS-23827] Puppet-lint regex matching too much

          Jon Skarpeteig added a comment - - edited

          Suggested regex fix:

          ^\s*([^:]+):([0-9]+):([^:]+):((?:WARNING)|(?:ERROR)):\s*(.*)$
          

          Jon Skarpeteig added a comment - - edited Suggested regex fix: ^\s*([^:]+):([0-9]+):([^:]+):((?:WARNING)|(?:ERROR)):\s*(.*)$

          Ulli Hafner added a comment -

          Can you please wrap your regexp with the noformat tag?

          Ulli Hafner added a comment - Can you please wrap your regexp with the noformat tag?

          Jon Skarpeteig added a comment - https://github.com/jenkinsci/warnings-plugin/pull/40

          Ulli Hafner added a comment -

          Thanks. Can you please update the existing test case so that the example will be correctly parsed now?

          Ulli Hafner added a comment - Thanks. Can you please update the existing test case so that the example will be correctly parsed now?

          Code changed in jenkins
          User: Jon Skarpeteig
          Path:
          src/main/java/hudson/plugins/warnings/parser/PuppetLintParser.java
          http://jenkins-ci.org/commit/warnings-plugin/05d8048d75b4f9b0e8015ac5863b882be1bd9c7c
          Log:
          Update PuppetLintParser.java

          Suggested fix for https://issues.jenkins-ci.org/browse/JENKINS-23827

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jon Skarpeteig Path: src/main/java/hudson/plugins/warnings/parser/PuppetLintParser.java http://jenkins-ci.org/commit/warnings-plugin/05d8048d75b4f9b0e8015ac5863b882be1bd9c7c Log: Update PuppetLintParser.java Suggested fix for https://issues.jenkins-ci.org/browse/JENKINS-23827

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/test/java/hudson/plugins/warnings/parser/PuppetLintParserTest.java
          src/test/resources/hudson/plugins/warnings/parser/puppet-lint.txt
          http://jenkins-ci.org/commit/warnings-plugin/c20cea3337e6cb58e256e5a99d6da2644e9ae7ef
          Log:
          [FIXED JENKINS-23827] Added new test case that exposes the bug.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/test/java/hudson/plugins/warnings/parser/PuppetLintParserTest.java src/test/resources/hudson/plugins/warnings/parser/puppet-lint.txt http://jenkins-ci.org/commit/warnings-plugin/c20cea3337e6cb58e256e5a99d6da2644e9ae7ef Log: [FIXED JENKINS-23827] Added new test case that exposes the bug.

            drulli Ulli Hafner
            yuav Jon Skarpeteig
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: