Skip to content
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-57098] JSON Parser for Json report #177

Merged
merged 3 commits into from
May 27, 2019

Conversation

jmini
Copy link
Contributor

@jmini jmini commented May 22, 2019

As discussed in #168 (comment) and the next comments, this PR organize JSON parser differently:

1. JsonLogParser (introduced as JsonParser in #168)

The format is a file (not .xml and not .json) where each line is an issue serialized as separated JSON object.

2. JsonParser

Parse a JSON report produced by the "Jenkins Warnings Next Generation Plugin" with the API call: GET [build-url]/[tool-id]/all/api/json

The format is json file (ending with .json) containing a valid JSON Object.
This object as a member issues containing an array of issues. Example:

{
    "issues": [
        {"fileName": "file.txt", "lineStart": 5, "lineEnd": 5, "message": "Message 1"},
        {"fileName": "other.txt", "lineStart": 15, "lineEnd": 18, "message": "Message 2"}
    ]
}

@codecov
Copy link

codecov bot commented May 22, 2019

Codecov Report

Merging #177 into master will increase coverage by 0.02%.
The diff coverage is 96.47%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #177      +/-   ##
============================================
+ Coverage     88.61%   88.64%   +0.02%     
- Complexity     1328     1339      +11     
============================================
  Files           163      165       +2     
  Lines          4216     4235      +19     
  Branches        464      465       +1     
============================================
+ Hits           3736     3754      +18     
  Misses          323      323              
- Partials        157      158       +1
Impacted Files Coverage Δ Complexity Δ
...java/edu/hm/hafner/analysis/parser/JsonParser.java 93.75% <92.85%> (-3.31%) 5 <5> (-26)
...a/edu/hm/hafner/analysis/parser/JsonLogParser.java 94.44% <94.44%> (ø) 12 <12> (?)
.../edu/hm/hafner/analysis/parser/JsonBaseParser.java 98.11% <98.11%> (ø) 25 <25> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0f6b98...a36eed5. Read the comment docs.

@jenkinsci jenkinsci deleted a comment May 23, 2019
@jenkinsci jenkinsci deleted a comment May 23, 2019
@jenkinsci jenkinsci deleted a comment May 23, 2019
@jenkinsci jenkinsci deleted a comment May 23, 2019
@jenkinsci jenkinsci deleted a comment May 23, 2019
@jenkinsci jenkinsci deleted a comment from jmini May 23, 2019
@jenkinsci jenkinsci deleted a comment May 23, 2019
@jenkinsci jenkinsci deleted a comment from jmini May 23, 2019
@jenkinsci jenkinsci deleted a comment from jmini May 23, 2019
@uhafner uhafner merged commit a36eed5 into jenkinsci:master May 27, 2019
@jmini
Copy link
Contributor Author

jmini commented May 28, 2019

@uhafner Thank you for merging this.
Are you creating a PR to update io.jenkins.plugins.analysis.warnings.WarningsPlugin and add some documentation or should I?

@uhafner
Copy link
Member

uhafner commented May 28, 2019

I will add it, thanks for your work!

uhafner added a commit to jenkinsci/warnings-ng-plugin that referenced this pull request May 28, 2019
@jmini
Copy link
Contributor Author

jmini commented Jun 5, 2019

See commit jenkinsci/warnings-ng-plugin@7063463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants