public interface NewCoverage
sensorContext.newCoverage().onFile(file)
.ofType(UNIT)
.lineHits(1, 2)
.lineHits(2, 5)
.lineHits(3, 0)
. ...
.conditions(3, 4, 2)
.conditions(12, 2, 2)
. ...
.save();
| Modifier and Type | Method and Description |
|---|---|
NewCoverage |
conditions(int line,
int conditions,
int coveredConditions)
Call this method as many time as needed to report coverage of conditions.
|
NewCoverage |
lineHits(int line,
int hits)
Call this method as many time as needed to report coverage hits per line.
|
NewCoverage |
ofType(CoverageType type) |
NewCoverage |
onFile(InputFile inputFile)
The covered file.
|
void |
save()
Call this method only once when your are done with defining coverage of the file.
|
NewCoverage onFile(InputFile inputFile)
NewCoverage ofType(CoverageType type)
NewCoverage lineHits(int line, int hits)
line - Line number (starts at 1).hits - Number of time the line was hit.NewCoverage conditions(int line, int conditions, int coveredConditions)
line - Line number (starts at 1).conditions - Number of conditions on this line (should be greater than 1).coveredConditions - Number of covered conditions.void save()
Copyright © 2009–2017 SonarSource. All rights reserved.