This repository was archived by the owner on Jul 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/main/java/fr/univartois/sonargo/coverage Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -134,21 +134,20 @@ public void execute(SensorContext context) {
134134 });
135135
136136 ProjectExplorer .searchByType (context , InputFile .Type .MAIN ).stream ()
137- .filter (i -> !inputFileWithCoverage .contains (i )).forEach (i -> saveForAllLine (context , i , 0 ));
137+ .filter (i -> !inputFileWithCoverage .contains (i )).forEach (i -> saveForAllLine (context , i ));
138138
139139 } catch (final IOException e ) {
140140 LOGGER .error ("IO Exception " + context .fileSystem ().baseDir ().getPath ());
141141 }
142142 }
143143
144- public void saveForAllLine (final SensorContext context , final InputFile i , final int hits ) {
144+ public void saveForAllLine (final SensorContext context , final InputFile i ) {
145145 final NewCoverage coverage = context .newCoverage ().onFile (i );
146146 try (Stream <String > fileLine = Files .lines (i .path ())) {
147147 FactoryLine .init ();
148148 LinePredicate .init ();
149- fileLine .map (FactoryLine ::create ).filter (LinePredicate ::filterLine ).forEach ((l ) -> {
150- coverage .lineHits (l .getLineNumber (), l .getHits ());
151- });
149+ fileLine .map (FactoryLine ::create ).filter (LinePredicate ::filterLine )
150+ .forEach (l -> coverage .lineHits (l .getLineNumber (), l .getHits ()));
152151
153152 coverage .ofType (CoverageType .UNIT );
154153 coverage .save ();
You can’t perform that action at this time.
0 commit comments