use of org.sonarsource.sonarlint.daemon.proto.SonarlintDaemon.AnalysisReq.Builder in project sonarlint-core by SonarSource.
the class StandaloneDaemonTest method createAnalysisConfig.
private AnalysisReq createAnalysisConfig(String projectName) throws IOException {
Path projectPath = clientTools.deployProject(projectName);
List<Path> sourceFiles = clientTools.collectAllFiles(projectPath.resolve("src"));
Builder builder = AnalysisReq.newBuilder();
for (Path p : sourceFiles) {
InputFile file = InputFile.newBuilder().setCharset(StandardCharsets.UTF_8.name()).setPath(p.toAbsolutePath().toString()).setIsTest(false).build();
builder.addFile(file);
}
return builder.setBaseDir(projectPath.toAbsolutePath().toString()).setWorkDir(temp.newFolder().getAbsolutePath()).putAllProperties(Collections.singletonMap("key", "value")).build();
}
Aggregations