-
Notifications
You must be signed in to change notification settings - Fork 40
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
draft: Add support for OpenCover format based on opencover plugin #46
Conversation
70f5055
to
ed8ed23
Compare
ed8ed23
to
7ae8b9e
Compare
12ee519
to
3530ca2
Compare
Let me know if you need some help here. I created a similar PR for a new parser of JUnit results, see #53 for details. |
@uhafner Thanks probably just missing time. Also I'm not very familiar yet with the model |
b4213f6
to
685043d
Compare
685043d
to
a3daf0e
Compare
src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java
Dismissed
Show dismissed
Hide dismissed
private void readFile(final XMLEventReader reader, final ModuleNode root, | ||
final StartElement currentStartElement, final FilteredLog log) throws XMLStreamException { | ||
|
||
PackageNode packageNode = null; |
Check notice
Code scanning / CodeQL
Unread local variable
if (event.isStartElement()) { | ||
var nextElement = event.asStartElement(); | ||
if (CLASS_NAME.equals(nextElement.getName())) { | ||
String className = reader.nextEvent().asCharacters().getData(); |
Check notice
Code scanning / CodeQL
Unread local variable
} | ||
} | ||
|
||
private Node createClassNode(final FileNode file, final StartElement parentElement) { |
Check notice
Code scanning / CodeQL
Useless parameter
} | ||
} | ||
|
||
private void readClass(final XMLEventReader reader, final StartElement parentElement, final FilteredLog log) throws XMLStreamException { |
Check notice
Code scanning / CodeQL
Useless parameter
} | ||
} | ||
|
||
private void readClass(final XMLEventReader reader, final StartElement parentElement, final FilteredLog log) throws XMLStreamException { |
Check notice
Code scanning / CodeQL
Useless parameter
} | ||
|
||
private void readFile(final XMLEventReader reader, final ModuleNode root, | ||
final StartElement currentStartElement, final FilteredLog log) throws XMLStreamException { |
Check notice
Code scanning / CodeQL
Useless parameter
} | ||
|
||
private void readPackage(final XMLEventReader reader, final ModuleNode root, | ||
final StartElement currentStartElement, final FilteredLog log) throws XMLStreamException { |
Check notice
Code scanning / CodeQL
Useless parameter
a3daf0e
to
d662db7
Compare
3a86a33
to
48d120d
Compare
48d120d
to
fcffe54
Compare
|
||
// Creating all file nodes | ||
for (var file : files.entrySet()) { | ||
FileNode fileNode = packageNode.findOrCreateFileNode(getFileName(file.getValue()), getTreeStringBuilder().intern(file.getValue())); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
packageNode
this
fcffe54
to
976bb7c
Compare
Signed-off-by: Valentin Delaye <jonesbusy@gmail.com>
976bb7c
to
a173982
Compare
Closing this PR. Will open a new clean one in the next few days. Only need to finish method complexity parsing and enrich test coverage. |
This is on on-going process to implement the opencover format to coverage-model
Only need to convert the parser from https://github.com/jenkinsci/opencover-plugin/blob/main/src/main/java/io/jenkins/plugins/opencover/OpenCoverReportAdapter.java#L37
Originally raised here on the deprecated code-coverage-api-plugin
Testing done
Submitter checklist