SonarLint is not working on my primary/desktop computer but it’s working on my notebook.
Installed components are similar - the only difference is in Java: desktop computer has Oracle Java 17 and notebook has OpenJDK 14.
In given example I would expect warning about returning “result” immediately inside foo() method which is shown on my notebook, but not showing on my desktop computer. All rules for Java are enabled in Eclipse preferences dialog.
Simple Java class
package com.thevegcat.app.data;
public class AppConfig {
public static final String DEFAULT_NAME = "TheVegCat";
public static final String OWNER = "H.Lo";
String foo() {
final String foo = "foo" + 12 + "bar";
return foo;
}
}
Output from Eclipse SonarLint console
Starting SonarLint for Eclipse 7.2.1.42550
SonarLint processing file /TheVegCat.development/src/test/java/com/thevegcat/app/data/AppConfig.java...
Starting standalone SonarLint engine 7.2.1.42550...
Found 0 issue(s)
Started security hotspot handler on port 64120
OS
Windows 10 Pro; Version 21H2; OS build 19044.1566; Windows Feature Experience Pack 120.2212.4170.0
Java
java version “17” 2021-09-14 LTS; Java™ SE Runtime Environment (build 17+35-LTS-2724); Java HotSpot™ 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)
IDE
Spring Tool Suite 4; Version: 4.13.1.RELEASE; Build Id: 202201311654; Lombok v1.18.22 “Envious Ferret”
SonarLint
SonarLint for Eclipse 7.2.1.42550 org.sonarlint.eclipse.feature.feature.group