-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-69036] Do not always log errors if input is empty #1419
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be also have two tests, one for a parser that scans the console log and one for an XML parser. See bug report for the former one.
plugin/src/main/java/io/jenkins/plugins/analysis/core/model/ReportScanningTool.java
Outdated
Show resolved
Hide resolved
plugin/src/main/java/io/jenkins/plugins/analysis/core/model/ReportScanningTool.java
Outdated
Show resolved
Hide resolved
See bug report for the former one. -> All SpotBugs are empty. so where should I look for? |
What I meant: we need a test case. One with the Doxgen Parser (see affected parser in the bug report https://issues.jenkins.io/browse/JENKINS-69036), and another one e.g. with CheckStyle. When you parse an empty log, then Doxgen will not report an error while CheckStyle does. |
This issue is closed. right? |
Not yet. Each PR requires a test case, see my comments above. |
Here is an example test case: This one fails, when there are no files found. You need to create a similar one that reads an empty file. When you enable your new option, the new test should not fail for Oxygen or JavaDoc. For a tool like PMD, CheckStyle, that read XML, there still should be an error when the input is empty. |
@shamlymhd ping! Are you planning to finish this PR? |
@uhafner yeah I had exams in the last two weeks and am back to this today. |
Ok, no worries! I just wasn't sure if you are waiting for some input. So take all the time you need! |
Codecov Report
@@ Coverage Diff @@
## master #1419 +/- ##
============================================
+ Coverage 79.83% 80.56% +0.72%
- Complexity 1473 1475 +2
============================================
Files 254 254
Lines 5644 5645 +1
Branches 425 426 +1
============================================
+ Hits 4506 4548 +42
+ Misses 986 945 -41
Partials 152 152
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
how can I solve this issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small documentation improvements.
plugin/src/test/java/io/jenkins/plugins/analysis/warnings/steps/StepsITest.java
Outdated
Show resolved
Hide resolved
plugin/src/test/java/io/jenkins/plugins/analysis/warnings/steps/StepsITest.java
Outdated
Show resolved
Hide resolved
plugin/src/test/java/io/jenkins/plugins/analysis/warnings/steps/StepsITest.java
Outdated
Show resolved
Hide resolved
plugin/src/test/java/io/jenkins/plugins/analysis/warnings/steps/StepsITest.java
Outdated
Show resolved
Hide resolved
…s/StepsITest.java Co-authored-by: Ullrich Hafner <ullrich.hafner@gmail.com>
…s/StepsITest.java Co-authored-by: Ullrich Hafner <ullrich.hafner@gmail.com>
…s/StepsITest.java Co-authored-by: Ullrich Hafner <ullrich.hafner@gmail.com>
…s/StepsITest.java Co-authored-by: Ullrich Hafner <ullrich.hafner@gmail.com>
Do not log an error if input is empty for those parsers that can read from the console log: in those cases an empty input just means that there are no warnings, see JENKINS-69036 for details.