Skip to content

Commit

Permalink
SLLS-284 take eslintBridgeServerPath from options instead of addition…
Browse files Browse the repository at this point in the history
…alAttributes
  • Loading branch information
sophio-japharidze-sonarsource committed Dec 10, 2024
1 parent e994574 commit 3348562
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<properties>
<jdk.min.version>17</jdk.min.version>
<sonarlint.core.version>10.11.2.79742</sonarlint.core.version>
<sonarlint.core.version>10.12.0.79771</sonarlint.core.version>
<!-- Version used by Xodus -->
<kotlin.version>1.6.10</kotlin.version>
<!-- analyzers used for tests -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public CompletableFuture<InitializeResult> initialize(InitializeParams params) {
setNotebookSyncOptions(c);
}

var eslintBridgeServerPath = (String) additionalAttributes.get("eslintBridgeServerPath");
var eslintBridgeServerPath = (String) options.get("eslintBridgeServerPath");
var info = new ServerInfo("SonarLint Language Server", getServerVersion("slls-version.txt"));
provideBackendInitData(productKey, userAgent, clientNodePath, eslintBridgeServerPath);
return new InitializeResult(c, info);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
package org.sonarsource.sonarlint.ls.folders;

import java.net.URI;
import java.util.List;
import org.sonarsource.sonarlint.core.analysis.api.ClientModuleInfo;
import org.sonarsource.sonarlint.core.analysis.api.ClientModulesProvider;
import org.sonarsource.sonarlint.ls.file.FileTypeClassifier;
import org.sonarsource.sonarlint.ls.file.FolderFileSystem;
import org.sonarsource.sonarlint.ls.java.JavaConfigCache;

public class WorkspaceFoldersProvider implements ClientModulesProvider {
public class WorkspaceFoldersProvider {

public static URI key(WorkspaceFolderWrapper folder) {
return folder.getUri();
Expand All @@ -43,13 +41,6 @@ public WorkspaceFoldersProvider(WorkspaceFoldersManager workspaceFoldersManager,
this.javaConfigCache = javaConfigCache;
}

@Override
public List<ClientModuleInfo> getModules() {
return workspaceFoldersManager.getAll().stream()
.map(this::createModuleInfo)
.toList();
}

private ClientModuleInfo createModuleInfo(WorkspaceFolderWrapper folder) {
var clientFileWalker = new FolderFileSystem(folder, javaConfigCache, fileTypeClassifier);
return new ClientModuleInfo(key(folder), clientFileWalker);
Expand Down

0 comments on commit 3348562

Please sign in to comment.