[RFF] AEM Rules for SonarQube 0.8

301 views
Skip to first unread message

Michał Chudy

unread,
Aug 26, 2016, 2:09:51 AM8/26/16
to SonarQube
Hi All,

I'm using SonarQube for over 5 years now and love to see as it's getting better and better. Over a year ago I've started developing plugin for SonarQube that is specific for AEM development. We've been using it and developing since then in Cognifide and it's quite mature now. So I'm glad that now we can contribute back to the community... :-)

Kind Regards,
Michał Chudy

G. Ann Campbell

unread,
Aug 26, 2016, 10:22:24 AM8/26/16
to SonarQube
Hi Michal,

I've added this to the Other Plugins page. But I suspect you were hoping for something more...?


Ann

P.S. Sorry, I don't know how to type the slash-l in your name.

michal...@cognifide.com

unread,
Aug 29, 2016, 4:59:21 AM8/29/16
to SonarQube
Hi Ann,

thank you for your response and linking to the plugin. I was hoping to be listed in SonarQube Update Center, because AEM Rules plugin meets all of the requirements mentioned on this page: http://docs.sonarqube.org/display/DEV/Deploying+to+Update+Center

It would be great if you could review my submission from this angle.

Oh, and don't bother with the Ł. :-)

Br,

G. Ann Campbell

unread,
Aug 29, 2016, 4:47:23 PM8/29/16
to SonarQube, michal...@cognifide.com
Hi Michal,

This is probably the best first-timer initial submission I've seen!

I'm ready to add this to the update center, but your most recent version is in RC status. Should I wait for you to release that one and make it the initial UC offering?

Also, I have two minor notes for you that you can take or leave:

* You might consider adding a license statement to your README.md. I found it in the pom, but it would be nice if it were more prominent. Especially since your readme ends with commercial support.

* I'm confused by the parenthetical FQ class names in the issue messages. 


Are these the classes/interfaces that should be employed in these cases instead of hard-coded values? If so I'd incorporate them directly into the messages like so: Use "PROPERTY_ADAPTABLE_CLASSES" in this annotation instead of a hardcoded value.


Ann

Michał Chudy

unread,
Aug 31, 2016, 9:03:36 AM8/31/16
to SonarQube, michal...@cognifide.com
Hi Ann,

great to hear that! :-) 

RC release was made on purpose to get some feedback. I've just released v0.8 with some improvements, which may be the initial UC offering.

I applied both of your comments and made some licensing clean up as well.

Regarding the constant-related rules, the new message is much more verbose: "Use constant SERVICE_VENDOR from interface org.osgi.framework.Constants instead of hardcoded value."

Plugin can be found here: https://github.com/Cognifide/AEM-Rules-for-SonarQube/releases/tag/v0.8

Br,
Michał

Michał Chudy

unread,
Aug 31, 2016, 9:08:36 AM8/31/16
to SonarQube, michal...@cognifide.com
Oh, and one more thing. I can not get rid off this code smell: https://sonarqube.com/issues/search#issues=AVbBVAE3fOF6DJUezlXE

I've tried different things and it just doesn't work. It doesn't make sense to me. Could you advise?

Michał

G. Ann Campbell

unread,
Aug 31, 2016, 9:40:21 AM8/31/16
to Michał Chudy, SonarQube, michal...@cognifide.com
Hi Michal,

For the code smell, just ignore it. I'm planning to deactivate that rule.

Regarding the plugin itself, since you said you made changes I decided to re-test. And my 6.0 server fails to start up with the new version:

2016.08.31 09:39:25 ERROR ce[o.s.ce.app.CeServer] Compute Engine startup failed
java.lang.NullPointerException: null
at org.sonar.core.platform.PluginLoader.basePluginKey(PluginLoader.java:176) ~[sonar-core-6.0.jar:na]
at org.sonar.core.platform.PluginLoader.defineClassloaders(PluginLoader.java:85) ~[sonar-core-6.0.jar:na]
at org.sonar.core.platform.PluginLoader.load(PluginLoader.java:71) ~[sonar-core-6.0.jar:na]
at org.sonar.ce.container.CePluginRepository.start(CePluginRepository.java:71) ~[sonar-ce-6.0.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320) ~[sonar-core-6.0.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:141) ~[sonar-core-6.0.jar:na]
at org.sonar.ce.container.ComputeEngineContainerImpl.start(ComputeEngineContainerImpl.java:160) ~[sonar-ce-6.0.jar:na]
at org.sonar.ce.ComputeEngineImpl.startup(ComputeEngineImpl.java:43) ~[sonar-ce-6.0.jar:na]
at org.sonar.ce.app.CeServer$CeMainThread.startup(CeServer.java:175) [sonar-ce-6.0.jar:na]
at org.sonar.ce.app.CeServer$CeMainThread.attemptStartup(CeServer.java:165) [sonar-ce-6.0.jar:na]
at org.sonar.ce.app.CeServer$CeMainThread.run(CeServer.java:153) [sonar-ce-6.0.jar:na]


:-/
Ann


---
G. Ann CAMPBELL | SonarSource
Product Owner

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/vI8OM-Ke64Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/71560a0b-d2c0-4910-909a-9d763f32e671%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

G. Ann Campbell

unread,
Aug 31, 2016, 10:11:36 AM8/31/16
to SonarQube, g.ch...@gmail.com, michal...@cognifide.com
Hi Michal,

Nevermind the stacktrace. This was on my side. I had set the bundled plugins aside to test a snapshot of JavaScript. Presumably your plugin relies on the Java plugin, which wasn't available => NPE.

I spun this up, and it looks good, including the updated messages. So I added it to the Update Center

BTW, I think this might be a false positive:



Ann

Michał Chudy

unread,
Aug 31, 2016, 10:42:43 AM8/31/16
to SonarQube, g.ch...@gmail.com, michal...@cognifide.com
Hi Ann,

thanks, that's good! I was trying to find the problem :P. Very smart of you, trying this plugin against ACS Commons. :-)

Regarding the false positive, yes. You're right. There's even a test file to cover that edge case (LongSessionService.java), however this one slipped away somehow. Here's the ticket to solve that in next iteration: https://github.com/Cognifide/AEM-Rules-for-SonarQube/issues/49

Thanks!
Michal
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages