Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLVSCODE-955 Prepare release 3.13.1 #420

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>
<groupId>org.sonarsource.sonarlint.ls</groupId>
<artifactId>sonarlint-language-server</artifactId>
<version>3.14-SNAPSHOT</version>
<version>3.13.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SonarLint Language Server</name>
<description>SonarLint Language Server</description>
Expand All @@ -24,7 +24,7 @@

<properties>
<jdk.min.version>17</jdk.min.version>
<sonarlint.core.version>10.11.0.79687</sonarlint.core.version>
<sonarlint.core.version>10.11.1.79701</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 @@ -20,6 +20,7 @@
package org.sonarsource.sonarlint.ls.file;

import java.net.URI;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import org.apache.commons.lang3.builder.ToStringBuilder;

Expand All @@ -33,7 +34,7 @@ public class VersionedOpenFile {
private final int version;
private final String content;

public VersionedOpenFile(URI uri, String languageId, int version, String content) {
public VersionedOpenFile(URI uri, @Nullable String languageId, int version, @Nullable String content) {
this.uri = uri;
this.languageId = languageId;
this.version = version;
Expand All @@ -44,6 +45,7 @@ public URI getUri() {
return uri;
}

@Nullable
public String getLanguageId() {
return languageId;
}
Expand All @@ -52,6 +54,7 @@ public int getVersion() {
return version;
}

@Nullable
public String getContent() {
return content;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private void notifyBackend(List<FileEvent> changes) {
if (event.getType() == FileChangeType.Deleted) {
deletedFileUris.add(fileUri);
} else {
var clientFileDto = getClientFileDto(new VersionedOpenFile(fileUri, "", 0, ""));
var clientFileDto = getClientFileDto(new VersionedOpenFile(fileUri, null, 0, null));
if (event.getType() == FileChangeType.Created) {
addedFiles.add(clientFileDto);
} else {
Expand Down Expand Up @@ -107,7 +107,8 @@ ClientFileDto getClientFileDto(VersionedOpenFile file) {
AtomicReference<ClientFileDto> clientFileDto = new AtomicReference<>();
var fileUri = file.getUri();
var fsPath = Paths.get(fileUri);
SonarLanguage sqLanguage = AnalysisClientInputFile.toSqLanguage(file.getLanguageId().toLowerCase(Locale.ROOT));
SonarLanguage sqLanguage = file.getLanguageId() != null ?
AnalysisClientInputFile.toSqLanguage(file.getLanguageId().toLowerCase(Locale.ROOT)) : null;
workspaceFoldersManager.findFolderForFile(fileUri)
.ifPresentOrElse(folder -> {
var settings = folder.getSettings();
Expand Down
Loading