diff --git a/src/main/java/edu/hm/hafner/grading/AutoGradingAction.java b/src/main/java/edu/hm/hafner/grading/AutoGradingAction.java index 61d7e84b..82d055f0 100644 --- a/src/main/java/edu/hm/hafner/grading/AutoGradingAction.java +++ b/src/main/java/edu/hm/hafner/grading/AutoGradingAction.java @@ -3,6 +3,7 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collections; @@ -11,7 +12,6 @@ import org.apache.commons.lang3.StringUtils; import edu.hm.hafner.analysis.FileReaderFactory; -import edu.hm.hafner.analysis.IssueParser; import edu.hm.hafner.analysis.Report; import edu.hm.hafner.analysis.Report.IssueFilterBuilder; import edu.hm.hafner.analysis.Severity; @@ -107,14 +107,6 @@ void run() { score.addAnalysisScores(new AnalysisReportSupplier(analysisScores)); System.out.println("=================================================================="); - if (Files.isReadable(Paths.get(JACOCO_RESULTS))) { - JacocoReport coverageReport = new JacocoParser().parse(read(JACOCO_RESULTS)); - score.addCoverageScores(new CoverageReportSupplier(coverageReport)); - } - else { - System.out.println("No JaCoCo coverage result files found!"); - } - GradingReport results = new GradingReport(); GitHubPullRequestWriter pullRequestWriter = new GitHubPullRequestWriter(); @@ -133,16 +125,6 @@ private String createAffectedFiles(final GradingConfiguration configuration) { return StringUtils.EMPTY; } - private Report parse(final GradingConfiguration configuration, final ParserDescriptor descriptor) { - return filterAnalysisReport(descriptor.createParser().parse(read(descriptor.getPattern())), - configuration.getAnalysisPattern()); - } - - private Report parse(final GradingConfiguration configuration, - final IssueParser parser, final String filePattern) { - return filterAnalysisReport(parser.parse(read(filePattern)), configuration.getAnalysisPattern()); - } - private Report filterAnalysisReport(final Report checkStyleReport, final String analysisPattern) { IssueFilterBuilder builder = new IssueFilterBuilder(); builder.setIncludeFileNameFilter(analysisPattern); @@ -167,10 +149,6 @@ private String getChecksName() { return StringUtils.defaultIfBlank(System.getenv("CHECKS_NAME"), "Autograding results"); } - private String getRepository() { - return StringUtils.defaultIfBlank(System.getenv("GITHUB_REPOSITORY"), "Autograding results"); - } - private String getConfiguration() { String configuration = System.getenv("CONFIG"); if (StringUtils.isBlank(configuration)) { @@ -195,7 +173,4 @@ private String readDefaultConfiguration() { } } - private static FileReaderFactory read(final String s) { - return new FileReaderFactory(Paths.get(s)); - } }