Class CoverageOutputFormatter.JacocoXmlCoverageFormatter
java.lang.Object
org.ek9lang.cli.CoverageOutputFormatter.JacocoXmlCoverageFormatter
- All Implemented Interfaces:
CoverageOutputFormatter
- Enclosing interface:
CoverageOutputFormatter
public static final class CoverageOutputFormatter.JacocoXmlCoverageFormatter
extends Object
implements CoverageOutputFormatter
JaCoCo-compatible XML format for CI/CD integration.
Includes METHOD, LINE, and BRANCH counters for compatibility with CI/CD tools like SonarQube and Codecov.
Example output:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.1//EN" "report.dtd">
<report name="EK9 Coverage">
<counter type="METHOD" missed="0" covered="5"/>
<counter type="LINE" missed="1" covered="7"/>
<counter type="BRANCH" missed="1" covered="3"/>
<package name="my/module">
<counter type="METHOD" missed="0" covered="3"/>
<counter type="LINE" missed="0" covered="4"/>
<counter type="BRANCH" missed="0" covered="2"/>
</package>
</report>
-
Nested Class Summary
Nested classes/interfaces inherited from interface CoverageOutputFormatter
CoverageOutputFormatter.DetailedCoverageFormatter, CoverageOutputFormatter.HtmlCoverageFormatter, CoverageOutputFormatter.HumanCoverageFormatter, CoverageOutputFormatter.JacocoXmlCoverageFormatter, CoverageOutputFormatter.JsonCoverageFormatter, CoverageOutputFormatter.TerseCoverageFormatter, CoverageOutputFormatter.VerboseCoverageFormatter -
Field Summary
Fields inherited from interface CoverageOutputFormatter
COVERAGE_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidformat(PrintStream out) Format and output coverage results.voidformatToFile(Path outputFile) Write coverage results to an XML file.
-
Constructor Details
-
JacocoXmlCoverageFormatter
public JacocoXmlCoverageFormatter()
-
-
Method Details
-
format
Description copied from interface:CoverageOutputFormatterFormat and output coverage results.- Specified by:
formatin interfaceCoverageOutputFormatter- Parameters:
out- The output stream to write to
-
formatToFile
Write coverage results to an XML file.- Specified by:
formatToFilein interfaceCoverageOutputFormatter- Parameters:
outputFile- The file path to write to
-