diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2019-01-17 16:03:25 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-01-17 20:21:00 +0100 |
commit | b5cc29188339a2bf7187de25be38853553a81482 (patch) | |
tree | 53d8a0c81a324ae2da694f7e71fa06179f4c33fe /sonar-scanner-protocol/src/main | |
parent | 51578709a9f2168f6774de9da88ad5975b9455fd (diff) | |
download | sonarqube-b5cc29188339a2bf7187de25be38853553a81482.tar.gz sonarqube-b5cc29188339a2bf7187de25be38853553a81482.zip |
SONAR-11632 Remove api/tests WS
- Drop api/tests WS
- Drop persistance of tests and coverage details from compute engine
- Drop tests and coverage details from scanner report
Diffstat (limited to 'sonar-scanner-protocol/src/main')
5 files changed, 0 insertions, 80 deletions
diff --git a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/FileStructure.java b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/FileStructure.java index b03e915b4a3..6e4b419c843 100644 --- a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/FileStructure.java +++ b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/FileStructure.java @@ -20,7 +20,6 @@ package org.sonar.scanner.protocol.output; import java.io.File; - import javax.annotation.concurrent.Immutable; /** @@ -40,8 +39,6 @@ public class FileStructure { CHANGESETS("changesets-", Domain.PB), SYMBOLS("symbols-", Domain.PB), COVERAGES("coverages-", Domain.PB), - TESTS("tests-", Domain.PB), - COVERAGE_DETAILS("coverage-details-", Domain.PB), SOURCE("source-", ".txt"), SGNIFICANT_CODE("sgnificant-code-", Domain.PB), CHANGED_LINES("changed-lines-", Domain.PB); diff --git a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java index 916adcf62a3..90e6143b9ca 100644 --- a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java +++ b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java @@ -181,26 +181,6 @@ public class ScannerReportReader { return null; } - @CheckForNull - public File readTests(int testFileRef) { - File file = fileStructure.fileFor(FileStructure.Domain.TESTS, testFileRef); - if (fileExists(file)) { - return file; - } - - return null; - } - - @CheckForNull - public File readCoverageDetails(int testFileRef) { - File file = fileStructure.fileFor(FileStructure.Domain.COVERAGE_DETAILS, testFileRef); - if (fileExists(file)) { - return file; - } - - return null; - } - public CloseableIterator<ScannerReport.ContextProperty> readContextProperties() { File file = fileStructure.contextProperties(); if (!fileExists(file)) { diff --git a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportWriter.java b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportWriter.java index cfa15c7553f..e20e37ff852 100644 --- a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportWriter.java +++ b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportWriter.java @@ -154,18 +154,6 @@ public class ScannerReportWriter { return file; } - public File writeTests(int componentRef, Iterable<ScannerReport.Test> tests) { - File file = fileStructure.fileFor(FileStructure.Domain.TESTS, componentRef); - Protobuf.writeStream(tests, file, false); - return file; - } - - public File writeCoverageDetails(int componentRef, Iterable<ScannerReport.CoverageDetail> tests) { - File file = fileStructure.fileFor(FileStructure.Domain.COVERAGE_DETAILS, componentRef); - Protobuf.writeStream(tests, file, false); - return file; - } - public File writeContextProperties(Iterable<ScannerReport.ContextProperty> properties) { File file = fileStructure.contextProperties(); Protobuf.writeStream(properties, file, false); diff --git a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/viewer/ScannerReportViewerApp.java b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/viewer/ScannerReportViewerApp.java index 0b2f132e1c3..0260f1fcb2e 100644 --- a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/viewer/ScannerReportViewerApp.java +++ b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/viewer/ScannerReportViewerApp.java @@ -25,7 +25,6 @@ import java.awt.Dimension; import java.awt.EventQueue; import java.io.File; import java.io.IOException; -import java.io.InputStream; import java.io.PrintWriter; import java.io.StringWriter; import java.nio.charset.StandardCharsets; @@ -256,7 +255,6 @@ public class ScannerReportViewerApp { updateSymbols(component); updateSource(component); updateCoverage(component); - updateTests(component); updateDuplications(component); updateIssues(component); updateExternalIssues(component); @@ -348,23 +346,6 @@ public class ScannerReportViewerApp { } } - private void updateTests(Component component) { - testsEditor.setText(""); - File tests = reader.readTests(component.getRef()); - if (tests == null) { - return; - } - try (InputStream inputStream = FileUtils.openInputStream(tests)) { - ScannerReport.Test test = ScannerReport.Test.parser().parseDelimitedFrom(inputStream); - while (test != null) { - testsEditor.getDocument().insertString(testsEditor.getDocument().getEndPosition().getOffset(), test + "\n", null); - test = ScannerReport.Test.parser().parseDelimitedFrom(inputStream); - } - } catch (Exception e) { - throw new IllegalStateException(e); - } - } - private void updateSource(Component component) { File sourceFile = reader.getFileStructure().fileFor(Domain.SOURCE, component.getRef()); sourceEditor.setText(""); diff --git a/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto b/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto index 57f86f9a73a..92e917a65f1 100644 --- a/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto +++ b/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto @@ -321,32 +321,6 @@ message SyntaxHighlightingRule { } } -message Test { - string name = 1; - TestStatus status = 2; - int64 duration_in_ms = 3; - string stacktrace = 4; - string msg = 5; - - enum TestStatus { - UNSET = 0; - OK = 1; - FAILURE = 2; - ERROR = 3; - SKIPPED = 4; - } -} - -message CoverageDetail { - string test_name = 1; - repeated CoveredFile covered_file = 2; - - message CoveredFile { - int32 file_ref = 1; - repeated int32 covered_line = 2 [packed = true]; - } -} - message AnalysisWarning { string text = 1; int64 timestamp = 2; |