From your analysis log, we can see that SonarJava is triggered, and rules are theoretically executed:
[INFO] Sensor JavaSquidSensor [java]
[INFO] Configured Java source version (sonar.java.source): 8
[INFO] JavaClasspath initialization
[INFO] JavaClasspath initialization (done) | time=20ms
[INFO] JavaTestClasspath initialization
[INFO] JavaTestClasspath initialization (done) | time=17ms
[INFO] Java Main Files AST scan
[INFO] 6 source files to be analyzed
[INFO] 6/6 source files have been analyzed
[WARNING] Classes not found during the analysis : [scala.Predef$$less, scala.Predef$$less$colon, scala.collection.parallel.mutable.ParHashMapCombiner$table]
[INFO] Java Main Files AST scan (done) | time=1429ms
[INFO] Java Test Files AST scan
[INFO] 1 source files to be analyzed
[INFO] 1/1 source files have been analyzed
[INFO] Java Test Files AST scan (done) | time=29ms
[INFO] Sensor JavaSquidSensor [java] (done) | time=2033ms
The SonarQube UI screenshot you are showing is however not displaying any issue at all… for all the files. So it’s quite strange to me. When testing it on a tiny project containing only your sample code, the rule is correctly triggered:
I have no idea why your code is now not triggering any issue for rule
squid:S3518. Your Quality Profile obviously inherit from SonarWay, so I would expect to have the rule enabled by default. Can you please verify that the rule is enabled in your profile?
Could you also try to setup a simple quality profile with only one rule enabled, S3518, run your analysis, and check that the issue is raised?
Please make sure to also associate your Quality Profile to the project.