[JIRA] (JENKINS-62198) Warnings Next Generation: Links not created for SpotBugs

2020-05-07 Thread d.ke...@web.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daniel Kepes created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-62198  
 
 
  Warnings Next Generation: Links not created for SpotBugs   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Ulli Hafner  
 
 
Components: 
 warnings-ng-plugin  
 
 
Created: 
 2020-05-07 07:24  
 
 
Environment: 
 Jenkins ver. 2.223, Warnings Next Generation Plugin 8.1.0  
 
 
Labels: 
 plugins jenkins pipeline  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Daniel Kepes  
 

  
 
 
 
 

 
 I have two Jobs using Warnings Next Generation Plugin for code analysis purposes. Both use the following analysis tools: 
 
Checkstyle 
CPD 
PMD 
SpotBugs 
 The project is built with maven using the corresponding plugins for the tools. One of the Jobs is analyzing the master branch of a Git repository, the other one analyzes ticket branches and compares the result against the first job using a quality gate. As I need to send a mail to the author of the last git commit of the ticket branch, I had to switch to a pipeline job for the second job, while the first is still a classic jenkins job configured through the ui. Now I have noticed that for SpotBugs the links to the issues in the code is not set, while it is working for the first job for creating the baseline. I made second version for the first job using a pipeline job and can reproduce the same 

[JIRA] (JENKINS-62198) Warnings Next Generation: Links not created for SpotBugs

2020-05-07 Thread 'd.ke...@web.de (JIRA)' via Jenkins Issues
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daniel Kepes commented on  JENKINS-62198  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Warnings Next Generation: Links not created for SpotBugs   
 

  
 
 
 
 

 
 As of SpotBugs, the log gives the following information: 

 

[SpotBugs] Searching for all files in '[PATH_TO_JENKINS]/jobs/KR1-ScnDrv-NG-Codeanalyse_Tmp/workspace' that match the pattern 'target/spotbugsXml.xml'
[SpotBugs] -> found 1 file
[SpotBugs] Successfully parsed file [PATH_TO_JENKINS]/jobs/KR1-ScnDrv-NG-Codeanalyse_Tmp/workspace/target/spotbugsXml.xml
[SpotBugs] -> found 21 issues (skipped 0 duplicates)
[SpotBugs] Post processing issues on 'Master' with source code encoding 'UTF-8'
[SpotBugs] Creating SCM blamer to obtain author and commit information for affected files
[SpotBugs] Creating SCM miner to obtain statistics for affected repository files
[SpotBugs] Resolving file names for all issues in source directory '[PATH_TO_JENKINS]/jobs/KR1-ScnDrv-NG-Codeanalyse_Tmp/workspace/src/main/java'
[SpotBugs] -> resolved paths in source directory (6 found, 0 not found)
[SpotBugs] Resolving module names from module definitions (build.xml, pom.xml, or Manifest.mf files)
[SpotBugs] -> all issues already have a valid module name
[SpotBugs] Resolving package names (or namespaces) by parsing the affected files
[SpotBugs] -> all affected files already have a valid package name
[SpotBugs] No filter has been set, publishing all 21 issues
[SpotBugs] Creating fingerprints for all affected code blocks to track issues over different builds
[SpotBugs] -> created fingerprints for 0 issues (skipped 21 issues)
[SpotBugs] Copying affected files to Jenkins' build folder '[PATH_TO_JENKINS]/jobs/KR1-ScnDrv-NG-Codeanalyse_Tmp/builds/5/files-with-issues'
[SpotBugs] -> 0 copied, 21 not in workspace, 0 not-found, 0 with I/O error
 

 I have censored the path to the jenkins home, there doesn't seem to be anything wrong with it anyways. So, there doesn't seem to be anything wrong to me until the last line where it states that there were no files copied, but 21 were outside the workspace. But I can go through the workspace from jenkins and the files are there. Using your URL pattern, I get rerouted to the builds home. Nothing special there, just a summary about the git revision, the analysis tools used and a link to the warnings report. Regarding the other bugs, the problems were similar, the logs also stated that the files would not be in the workspace. But as I figured out that those tools use absolute paths in contrast to spotbugs (which gives only the packages and class names), I tested around with relative paths and then I got the links working. Maybe a short hint to avoid misunderstandings: I get the report about the warnings and all the warnings / issues are there but when I am on the lowest level and try to look at the code, there is only the name of the file and the linenumber of the issue, without a link I could follow.  
 

  
 
 
 
 

 
 
 

[JIRA] (JENKINS-62198) Warnings Next Generation: Links not created for SpotBugs

2020-05-07 Thread 'ullrich.haf...@gmail.com (JIRA)' via Jenkins Issues
Title: Message Title


 
 
 
 

 
 
 

 
   
 Ulli Hafner commented on  JENKINS-62198  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Warnings Next Generation: Links not created for SpotBugs   
 

  
 
 
 
 

 
 
 
BTW: the plugin should provide a way to relativize the paths for the other tools in future. The tools use absolute paths, there's nothing the users could do about it. Having to trick with sed commands feels nasty, the plugin should be able to deal with that.
 The plugin automatically creates relative paths, there is nothing you should care about. What exactly is not working with the other tools?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.206130.1588836276000.23091.1588837680123%40Atlassian.JIRA.


[JIRA] (JENKINS-62198) Warnings Next Generation: Links not created for SpotBugs

2020-05-07 Thread 'ullrich.haf...@gmail.com (JIRA)' via Jenkins Issues
Title: Message Title


 
 
 
 

 
 
 

 
   
 Ulli Hafner commented on  JENKINS-62198  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Warnings Next Generation: Links not created for SpotBugs   
 

  
 
 
 
 

 
 The plugin is reporting errors in the console log (or in the view http://localhost:8080/job/[job-name]/[build-number]/spotbugs/info/). What is shown there?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.206130.1588836276000.23089.1588837560127%40Atlassian.JIRA.