aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-protocol/src/main
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2022-03-14 11:28:22 -0500
committersonartech <sonartech@sonarsource.com>2022-03-18 20:02:57 +0000
commitecf844b39473fe21acaa1f832d244a4cc4c9f811 (patch)
treea03e87cb743b877be05c92774e6f009bad3932f5 /sonar-scanner-protocol/src/main
parent1269984e8e09338c057d068d715ade7df5a0c354 (diff)
downloadsonarqube-ecf844b39473fe21acaa1f832d244a4cc4c9f811.tar.gz
sonarqube-ecf844b39473fe21acaa1f832d244a4cc4c9f811.zip
SONAR-16097 Add plugin cache to the Sensor API
Diffstat (limited to 'sonar-scanner-protocol/src/main')
-rw-r--r--sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/FileStructure.java2
-rw-r--r--sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java6
-rw-r--r--sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportWriter.java4
-rw-r--r--sonar-scanner-protocol/src/main/protobuf/scanner_internal.proto2
4 files changed, 7 insertions, 7 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 041bf6cbeff..d5bcf2a3a4d 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
@@ -66,7 +66,7 @@ public class FileStructure {
return new File(dir, "metadata.pb");
}
- public File pluginCache() {
+ public File analysisCache() {
return new File(dir, "plugin-cache.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 aaa0190a802..5e1376a3f1c 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
@@ -81,12 +81,12 @@ public class ScannerReportReader {
@CheckForNull
public InputStream getPluginCache() {
- File file = fileStructure.pluginCache();
+ File file = fileStructure.analysisCache();
if (fileExists(file)) {
try {
- return new BufferedInputStream(new FileInputStream(fileStructure.pluginCache()));
+ return new BufferedInputStream(new FileInputStream(fileStructure.analysisCache()));
} catch (FileNotFoundException e) {
- throw new IllegalStateException("Unable to open file " + fileStructure.pluginCache(), e);
+ throw new IllegalStateException("Unable to open file " + fileStructure.analysisCache(), e);
}
}
return null;
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 88f16d14d19..1b67cd41ea6 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
@@ -95,8 +95,8 @@ public class ScannerReportWriter {
return file;
}
- public File writePluginCache(ScannerInternal.PluginCacheMsg cacheMsg) {
- File file = fileStructure.pluginCache();
+ public File writeAnalysisCache(ScannerInternal.AnalysisCacheMsg cacheMsg) {
+ File file = fileStructure.analysisCache();
Protobuf.writeGzip(cacheMsg, file);
return file;
}
diff --git a/sonar-scanner-protocol/src/main/protobuf/scanner_internal.proto b/sonar-scanner-protocol/src/main/protobuf/scanner_internal.proto
index b0d38058c4c..4a9f0c53a58 100644
--- a/sonar-scanner-protocol/src/main/protobuf/scanner_internal.proto
+++ b/sonar-scanner-protocol/src/main/protobuf/scanner_internal.proto
@@ -3,6 +3,6 @@ syntax = "proto3";
option java_package = "org.sonar.scanner.protocol.internal";
option optimize_for = SPEED;
-message PluginCacheMsg {
+message AnalysisCacheMsg {
map<string, bytes> map = 1;
}