we from devonfw just released the 3.2.1 version of our sonar-devon4j-plugin and would love to have it on the marketplace and added to the plugin library.
Thanks for the feedback. No worries. It took us almost a year to get to this point. Will not hurt if it takes another week or two. Thanks for having us on your list.
Sorry for the looong delay. I finally got to this. Iāve asked for a few changes in your PR. Other than that, weāre good to go!
In addition, I have some non-blocking feedback on the plugin. Tracing the threads back, I see that I tested a while ago, but since it has been >1y and it was a new version I wanted to test again.
For class- and method-level issues, youāve marked the entire body of the class/method as the issue location. This has the disadvantage of a) being irritating, b) putting your issue message at the bottom of a potentially long block of relevant(?) text. E.G.
I suggest instead you only use the name/declaration as the issue location.
Youāve used colors in your rule descriptions (bravo on adding them! ) to indicate noncompliant/compliant code sections. Just be aware that this may not be accessible for the colorblind
I know we may not present the best example in this area, but weāre aware of it and working on it iteratively.
So! Update your PR per my review, and thatās all we need.
Ā
Ann
P.S. There was a recent thread about adding architectural checks. You might want to find it and give yourself a plug.
As a followup, I still have your plugin loaded in my instance (because Iām lazy) and I just analyzed a project with no Devon4j-related files/etc. I got a lot of NPEs in my analysis logs with instructions to āreport this problem to SonarSourceā here in the community. Iām guessing those instructions didnāt come from you, but the NPEs did.
[ERROR] Unable to run check class com.devonfw.ide.sonarqube.common.impl.check.naming.DevonNamingConventionInterfaceExtendsInterfaceRepositoryCheck - N9 on file 'src/main/java/com/sonarsource/ruleapi/utilities/package-info.java', To help improve SonarJava, please report this problem to SonarSource : see https://www.sonarqube.org/community/
java.lang.NullPointerException: null
at com.devonfw.ide.sonarqube.common.impl.check.naming.DevonNamingConventionInterfaceExtendsInterfaceCheck.scanFile(DevonNamingConventionInterfaceExtendsInterfaceCheck.java:44)
at org.sonar.java.model.VisitorsBridge.runScanner(VisitorsBridge.java:149)
at org.sonar.java.model.VisitorsBridge.lambda$visitFile$1(VisitorsBridge.java:140)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:140)
at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:90)
at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:67)
at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:115)
at org.sonar.java.JavaSquid.scan(JavaSquid.java:109)
at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:88)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:387)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:383)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:346)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy23.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:65)
at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:104)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
It would be nice if you would
prioritize this for your next release
keep an eye on the community to field these reports until at least your next release
I didnāt notice & my analysis logs are gone. And after encountering this I finally did clean out my plugins directory. But let me know if you canāt recreate it on your side & Iāll give it a go.