Skip to content
Open
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
10 changes: 0 additions & 10 deletions .cirrus/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +0,0 @@
ARG CIRRUS_AWS_ACCOUNT
ARG JDK_VERSION
FROM ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j${JDK_VERSION}-m3-latest

USER root

ENV NODE_VERSION=18
RUN apt-get update && apt-get install -y nodejs=${NODE_VERSION}.*

USER sonarsource
2 changes: 1 addition & 1 deletion analysis-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-analysis-engine</artifactId>
<name>SonarLint Core - Analysis Engine</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,7 @@ public WriteCache nextCache() {
throw unsupported();
}

@Override
public void addTelemetryProperty(String property, String value) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
Expand All @@ -43,6 +43,7 @@
import org.sonarsource.sonarlint.core.analysis.container.analysis.issue.SensorQuickFix;
import org.sonarsource.sonarlint.plugin.api.issue.NewQuickFix;
import org.sonarsource.sonarlint.plugin.api.issue.NewSonarLintIssue;
import org.sonar.api.issue.impact.SoftwareQuality;

import static java.util.Objects.requireNonNull;

Expand Down Expand Up @@ -225,4 +226,13 @@ public boolean isQuickFixAvailable() {
public Optional<String> ruleDescriptionContextKey() {
return ruleDescriptionContextKey;
}

@Override
public NewIssue overrideImpact(SoftwareQuality var1, org.sonar.api.issue.impact.Severity var2) {
return null;
}
@Override
public Map<SoftwareQuality, org.sonar.api.issue.impact.Severity> overridenImpacts() {
return new HashMap<SoftwareQuality, org.sonar.api.issue.impact.Severity>();
}
}
2 changes: 1 addition & 1 deletion client-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-client-api</artifactId>
<name>SonarLint Core - Client API</name>
Expand Down
2 changes: 1 addition & 1 deletion commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-commons</artifactId>
<name>SonarLint Core - Commons</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public class HashingPathMapper implements PathMapper<String> {

private static final String HEX_LETTERS = "0123456789abcdef";
private static final String HASHING_ALGORITHM = "SHA1";
private static final String HASHING_ALGORITHM = "SHA-256";
private static final int HASH_LENGTH = 40;

private final Path base;
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-core</artifactId>
<name>SonarLint Core - Implementation</name>
Expand Down
2 changes: 1 addition & 1 deletion http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-http</artifactId>
<name>SonarLint Core - HTTP</name>
Expand Down
2 changes: 1 addition & 1 deletion issue-tracking/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-issue-tracking</artifactId>
<name>SonarLint Issue Tracking</name>
Expand Down
8 changes: 4 additions & 4 deletions its/plugins/custom-sensor-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-its</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>org.sonarsource.plugins.example</groupId>
<artifactId>custom-sensor-plugin</artifactId>
<packaging>sonar-plugin</packaging>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>

<name>Example Plugin for SonarQube</name>
<description>Example of plugin for SonarQube</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.apiVersion>5.6</sonar.apiVersion>
<jdk.min.version>11</jdk.min.version>
<sonar.apiVersion>9.14.0.375</sonar.apiVersion>
<jdk.min.version>17</jdk.min.version>
</properties>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions its/plugins/global-extension-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-its</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -18,8 +18,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.apiVersion>7.0</sonar.apiVersion>
<jdk.min.version>11</jdk.min.version>
<sonar.apiVersion>9.14.0.375</sonar.apiVersion>
<jdk.min.version>17</jdk.min.version>
</properties>

<dependencies>
Expand Down
8 changes: 4 additions & 4 deletions its/plugins/java-custom-rules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-its</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -18,15 +18,15 @@
<description>Java Custom Rules</description>

<properties>
<sonarjava.version>5.13.1.18282</sonarjava.version>
<analyzer.commons.version>1.14.1.690</analyzer.commons.version>
<sonarjava.version>7.16.0.30901</sonarjava.version>
<analyzer.commons.version>2.11.0.2861</analyzer.commons.version>
</properties>

<dependencies>
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-plugin-api</artifactId>
<version>7.9</version>
<version>9.14.0.375</version>
<scope>provided</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion its/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-core-its</artifactId>
<name>SonarLint Core - ITs</name>
Expand Down
2 changes: 1 addition & 1 deletion its/tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-its</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-core-its-tests</artifactId>
<name>SonarLint Core - ITs - Tests</name>
Expand Down
2 changes: 1 addition & 1 deletion osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-core-osgi</artifactId>
<name>SonarLint Core - OSGi bundle</name>
Expand Down
2 changes: 1 addition & 1 deletion plugin-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-plugin-api</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion plugin-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-plugin-commons</artifactId>
<name>SonarLint Core - Plugin Commons</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import javax.annotation.CheckForNull;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.SystemUtils;
Expand Down Expand Up @@ -133,10 +136,26 @@ private static Path extractDependencyInTempFolder(PluginInfo info, String depend
}
}

private static void extractFile(Path zipFile, String fileName, Path outputFile) throws IOException {
try (var fileSystem = FileSystems.newFileSystem(zipFile, (ClassLoader) null)) {
var fileToExtract = fileSystem.getPath(fileName);
Files.copy(fileToExtract, outputFile);

private static void extractFile(Path zipFilePath, String fileName, Path outputFile) throws IOException {
try (ZipFile zipFile = new ZipFile(String.valueOf(zipFilePath))) {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry entry = entries.nextElement();
String normalizedFileName = fileName.replace("\\", "/");
String normalizedJarName = entry.getName().replace("\\","/");
if (normalizedJarName.equals(normalizedFileName)) {
try{
Files.copy(zipFile.getInputStream(entry), outputFile, StandardCopyOption.REPLACE_EXISTING);
LOG.debug("File successfully extracted");
} catch (IOException e) {
LOG.error("Error extracting file from ZIP: {}", fileName);
throw new IOException(e);
}
return;
}
}
LOG.debug("File {} not found in {}", fileName, zipFilePath);
}
}

Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
<packaging>pom</packaging>
<name>SonarLint Core</name>
<description>Library used by SonarLint flavors (Eclipse, IntelliJ, VSCode...)</description>
Expand Down Expand Up @@ -43,7 +43,7 @@
</modules>

<properties>
<sonar-plugin-api.version>9.15-CODESCAN</sonar-plugin-api.version>
<sonar-plugin-api.version>10.14-CODESCAN</sonar-plugin-api.version>
<sonar-ws.version>9.9.1.69595</sonar-ws.version>
<sonar-markdown.version>9.9.0.65466</sonar-markdown.version>
<sonar-scanner-protocol.version>7.9</sonar-scanner-protocol.version>
Expand All @@ -56,15 +56,15 @@
<jdk.min.version>11</jdk.min.version>
<gson.version>2.10</gson.version>
<mockito.version>4.9.0</mockito.version>
<kotlin.version>1.7.22</kotlin.version>
<kotlin.version>1.9.25</kotlin.version>
<lsp4j.version>0.19.0</lsp4j.version>

<version.surefire.plugin>3.1.2</version.surefire.plugin>

<sonar.host.url>https://app.codescan.io</sonar.host.url>
<sonar.login>e0b1aba256426ca4d4bf0312062d7e2129eb88df</sonar.login>
<sonar.login></sonar.login>
<sonar.password></sonar.password>
<sonar.organization>c0ae17aade58da85a4d275acfcd30a4c</sonar.organization>
<sonar.organization>org</sonar.organization>
<sonar.projectKey>sonar-plugin-api</sonar.projectKey>
<sonar.moduleKey>${artifactId}</sonar.moduleKey>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion report-aggregate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-report-aggregate</artifactId>
<name>SonarLint Coverage Reports Aggregator</name>
Expand Down
2 changes: 1 addition & 1 deletion rule-extractor-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-rule-extractor-cli</artifactId>
<name>SonarLint Core - Rule Extractor - CLI</name>
Expand Down
2 changes: 1 addition & 1 deletion rule-extractor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core-parent</artifactId>
<version>9.1.2-CODESCAN</version>
<version>9.1.3-CODESCAN</version>
</parent>
<artifactId>sonarlint-rule-extractor</artifactId>
<name>SonarLint Core - Rule Extractor</name>
Expand Down
Loading