}
private void mergeReports(Project project) {
- File baseDir = project.getFileSystem().getBasedir();
-
- File reportUTs = new File(baseDir, configuration.getReportPath());
- File reportITs = new File(baseDir, configuration.getItReportPath());
- File reportAllTests = new File(baseDir, MERGED_EXEC);
+ File reportUTs = project.getFileSystem().resolvePath(configuration.getReportPath());
+ File reportITs = project.getFileSystem().resolvePath(configuration.getItReportPath());
+ File reportAllTests = project.getFileSystem().resolvePath(MERGED_EXEC);
SessionInfoStore infoStore = new SessionInfoStore();
ExecutionDataStore dataStore = new ExecutionDataStore();
reader.setSessionInfoVisitor(infoStore);
reader.setExecutionDataVisitor(dataStore);
reader.read();
- } catch (final IOException e) {
+ } catch (IOException e) {
throw new SonarException(String.format("Unable to read %s", file.getAbsolutePath()), e);
} finally {
Closeables.closeQuietly(resourceStream);
if ('lines_to_cover'==@coverage_filter || 'coverage'==@coverage_filter || 'line_coverage'==@coverage_filter ||
'new_lines_to_cover'==@coverage_filter || 'new_coverage'==@coverage_filter || 'new_line_coverage'==@coverage_filter ||
'it_lines_to_cover'==@coverage_filter || 'it_coverage'==@coverage_filter || 'it_line_coverage'==@coverage_filter ||
- 'new_it_lines_to_cover'==@coverage_filter || 'new_it_coverage'==@coverage_filter || 'new_it_line_coverage'==@coverage_filter
+ 'new_it_lines_to_cover'==@coverage_filter || 'new_it_coverage'==@coverage_filter || 'new_it_line_coverage'==@coverage_filter ||
'merged_lines_to_cover'==@coverage_filter || 'merged_coverage'==@coverage_filter || 'merged_line_coverage'==@coverage_filter ||
'new_merged_lines_to_cover'==@coverage_filter || 'new_merged_coverage'==@coverage_filter || 'new_merged_line_coverage'==@coverage_filter)
@coverage_filter = "#{it_prefix}lines_to_cover"
filter_lines { |line| line.hits && line.after(to) }
elsif ('uncovered_lines'==@coverage_filter || 'new_uncovered_lines'==@coverage_filter ||
- 'it_uncovered_lines'==@coverage_filter || 'new_it_uncovered_lines'==@coverage_filter
+ 'it_uncovered_lines'==@coverage_filter || 'new_it_uncovered_lines'==@coverage_filter ||
'merged_uncovered_lines'==@coverage_filter || 'new_merged_uncovered_lines'==@coverage_filter)
@coverage_filter = "#{it_prefix}uncovered_lines"
filter_lines { |line| line.hits && line.hits==0 && line.after(to) }
elsif ('conditions_to_cover'==@coverage_filter || 'branch_coverage'==@coverage_filter ||
'new_conditions_to_cover'==@coverage_filter || 'new_branch_coverage'==@coverage_filter ||
'it_conditions_to_cover'==@coverage_filter || 'it_branch_coverage'==@coverage_filter ||
- 'new_it_conditions_to_cover' == @coverage_filter || 'new_it_branch_coverage'==@coverage_filter
+ 'new_it_conditions_to_cover' == @coverage_filter || 'new_it_branch_coverage'==@coverage_filter ||
'merged_conditions_to_cover'==@coverage_filter || 'merged_branch_coverage'==@coverage_filter ||
'new_merged_conditions_to_cover' == @coverage_filter || 'new_merged_branch_coverage'==@coverage_filter)
@coverage_filter="#{it_prefix}conditions_to_cover"
filter_lines { |line| line.conditions && line.conditions>0 && line.after(to) }
elsif ('uncovered_conditions' == @coverage_filter || 'new_uncovered_conditions' == @coverage_filter ||
- 'it_uncovered_conditions'==@coverage_filter || 'new_it_uncovered_conditions' == @coverage_filter
+ 'it_uncovered_conditions'==@coverage_filter || 'new_it_uncovered_conditions' == @coverage_filter ||
'merged_uncovered_conditions'==@coverage_filter || 'new_merged_uncovered_conditions' == @coverage_filter)
@coverage_filter="#{it_prefix}uncovered_conditions"
filter_lines { |line| line.conditions && line.covered_conditions && line.covered_conditions<line.conditions && line.after(to) }
end
end
+
render :action => 'index', :layout => !request.xhr?
end
-
def render_duplications
duplications_data = @snapshot.measure('duplications_data')