I have flaw finder and WNG active in my jenkins build. If I run 

      flawfinder --html --context src/ > flaw_finder_results.html

      I get an output file stating one issue is found. HTML attached. 

       Using WNG in the post section of the Jenkinsfile

      recordIssues tools: [flawfinder(pattern: "${FOLDERS_TO_SCAN}/flaw_finder_results.html")]
      

       

      In my Jenkins pipeline I can see that this file is found and successfully parsed. No errors are found. 

      [FlawFinder] Searching for all files in '/var/lib/jenkins/workspace/C_Application_test_jenkins_email' that match the pattern 'main_layers/meta-mainapplication/recipes-core/MAIN_Application/files/MAIN_Application/flaw_finder_results.html'
      [FlawFinder] -> found 1 file
      [FlawFinder] Successfully parsed file /var/lib/jenkins/workspace/C_Application_test_jenkins_email/main_layers/meta-mainapplication/recipes-core/MAIN_Application/files/MAIN_Application/flaw_finder_results.html
      [FlawFinder] -> found 0 issues (skipped 0 duplicates)
      

      Is this an issue with my setup or an issue in WNG?

          [JENKINS-68040] Warnings Next Generation Flaw Finder error

          Ulli Hafner added a comment - - edited

          The warnings plugin help shows as command to use flawfinder -S. Can you try that? The parser parses warnings line by line and not in HTML format: https://github.com/jenkinsci/analysis-model/blob/master/src/test/resources/edu/hm/hafner/analysis/parser/flawfinder.log

          Ulli Hafner added a comment - - edited The warnings plugin help shows as command to use flawfinder -S . Can you try that? The parser parses warnings line by line and not in HTML format: https://github.com/jenkinsci/analysis-model/blob/master/src/test/resources/edu/hm/hafner/analysis/parser/flawfinder.log

          Michael Miner added a comment - - edited

          That was it! CppCheck needed an html file so I assumed this would be the same! Thank you!

          flawfinder --singleline --context src/ > flaw_finder_results.log

          It does still run into the issue 

          [FlawFinder] [-ERROR-] Can't create fingerprints for some files: 
          [FlawFinder] [-ERROR-] - 'src/utilities/ring_buffer.c' file not found
          

          Michael Miner added a comment - - edited That was it! CppCheck needed an html file so I assumed this would be the same! Thank you! flawfinder --singleline --context src/ > flaw_finder_results.log It does still run into the issue  [FlawFinder] [-ERROR-] Can't create fingerprints for some files: [FlawFinder] [-ERROR-] - 'src/utilities/ring_buffer.c' file not found

          Michael Miner added a comment -

          This one I solved. I had to force a directory change in my jenkins file so the WNG parser could find the appropriate directories. 

          Michael Miner added a comment - This one I solved. I had to force a directory change in my jenkins file so the WNG parser could find the appropriate directories. 

          Ulli Hafner added a comment -

          Ulli Hafner added a comment - Ok. Can you create a PR for https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/registry/FlawfinderDescriptor.java that uses the correct syntax in the help?

          Michael Miner added a comment -

          This is not an issue with your code rather my folder structure. I am using Yocto and have a slightly odd structure! Your code is solid!

          Michael Miner added a comment - This is not an issue with your code rather my folder structure. I am using Yocto and have a slightly odd structure! Your code is solid!

            drulli Ulli Hafner
            michaelbminer Michael Miner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: