@Test public void should_continue_if_parsing_fails() { SensorContextTester context = SensorContextTester.create(COVERAGE_DIR); context.setSettings(new MapSettings()); context.settings().setProperty("sonar.go.coverage.reportPaths", "test1" + File.separator + "coverage.out, coverage.relative.out"); Path baseDir = COVERAGE_DIR.toAbsolutePath(); GoPathContext goContext = new GoPathContext(File.separatorChar, File.pathSeparator, baseDir.toString()); GoCoverSensor sensor = new GoCoverSensor(); sensor.execute(context, goContext); assertThat(logTester.logs(LoggerLevel.ERROR)).hasSize(1); assertThat(logTester.logs(LoggerLevel.ERROR).get(0)).endsWith("coverage.out: Invalid go coverage, expect 'mode:' on the first line."); }
@Override public void execute(SensorContext context) { execute(context, GoPathContext.DEFAULT); }
GoCoverSensor implements Sensor { @Override public void execute(SensorContext context) { execute(context, GoPathContext.DEFAULT); } }
GoCoverSensor implements Sensor { @Override public void execute(SensorContext context) { execute(context, GoPathContext.DEFAULT); }  }
GoCoverSensor implements Sensor { @Override public void execute(SensorContext context) { execute(context, GoPathContext.DEFAULT); }  @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); }
GoCoverSensor implements Sensor { @Override public void execute(SensorContext context) { execute(context, GoPathContext.DEFAULT); }  @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); static final String REPORT_PATH_KEY; }