Skip to content
Draft
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
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ARG MAVEN_BUILDER=3-openjdk-17-slim
#ARG MAVEN_BUILDER=3-openjdk-17-slim
#ARG SONARQUBE_VERSION=25.3.0.104237-community

#ARG SONARQUBE_VERSION=24.12.0.100206-community
ARG SONARQUBE_VERSION=25.3.0.104237-community
ARG MAVEN_BUILDER=3-openjdk-11-slim
ARG SONARQUBE_VERSION=9.9.8-community

FROM maven:${MAVEN_BUILDER} AS builder

Expand Down
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<properties>

<java.version>17</java.version>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<!-- to prevent message: system modules path not set in conjunction with -source 11 -->
Expand Down Expand Up @@ -82,7 +82,8 @@
<test-it.sonarqube.keepRunning>false</test-it.sonarqube.keepRunning>

<!-- Version of `sonarqube` used by integration tests (you can override this value to perform matrix compatibility tests) -->
<test-it.sonarqube.version>25.5.0.107428</test-it.sonarqube.version>
<!-- <test-it.sonarqube.version>25.5.0.107428</test-it.sonarqube.version>-->
<test-it.sonarqube.version>9.9.8.100196</test-it.sonarqube.version>

<!-- Version of `sonar-python-plugin` used by integration tests (you can override this value to perform matrix compatibility tests) -->
<test-it.sonarpython.version>${sonarpython.version}</test-it.sonarpython.version>
Expand Down Expand Up @@ -329,7 +330,7 @@
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<!-- max version without pb for JDK 17 / recent versions have a NPE when deploying in docker -->
<!-- max version without pb for JDK 11 and 17 / recent versions have a NPE when deploying in docker -->
<version>4.1</version>
<configuration>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<name>creedengo Python Sonar Plugin Test Project</name>

<properties>
<java.version>17</java.version>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ private boolean isItemsCall(Expression expr) {
}

private void trackNameUsages(Tree node, ItemsLoopInfo info) {
if (node instanceof Name nodeName) {
if (node instanceof Name) {
Name nodeName = (Name) node;
info.markUsage(nodeName.name());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ public static RegularArgument nthArgumentOrKeyword(int argPosition, String keywo
}

private static boolean hasKeyword(Argument argument, String keyword) {
return argument instanceof RegularArgument regularArgument &&
Optional.ofNullable(regularArgument.keywordArgument())
if (! (argument instanceof RegularArgument))
return false;
RegularArgument regularArgument = (RegularArgument) argument;
return Optional.ofNullable(regularArgument.keywordArgument())
.map(Name::name)
.filter(name -> name.equals(keyword))
.isPresent();
Expand Down