Feature request: support for custom @Nullable/@Nonnull annotations

84 views
Skip to first unread message

marx.f...@gmail.com

unread,
Apr 16, 2018, 4:32:36 PM4/16/18
to SonarQube
Hello.

We are using custom @Nullable and @Nonnull annotations that are defined in my company custom package since we cannot use javax package for legal reasons (JSR-305 is dormant for many years).
Please provide any settings for this feature. 

I can help with PR on GitHub, but need some advice how can I archive this goal (found https://github.com/SonarSource/sonar-java/blob/master/java-frontend/src/main/java/org/sonar/java/se/NullableAnnotationUtils.java but doesn't have any idea how to add settings).


Best regards,
Sergey.

Michael Gumowski

unread,
Jun 7, 2018, 10:58:03 AM6/7/18
to marx.f...@gmail.com, SonarQube
Hello Sergey,

We currently does not plan to work on any way of configuring the symbolic execution engine used by SonarJava on how we handle nullness constraints. However, we are planning to add the support the Checker framework at some point (SONARJAVA-2776SONARJAVA-2777). Even Google guava moved to it recently. Would it solve your issues? Maybe another existing framework that you may use in the context of your company?

Now, adding support of user-specific annotations would require some changes in the engine, and may have impacts on it that we need to evaluate/specify before moving in that direction. I however really appreciate your offer to contribute to the project in that direction.

Cheers,
Michael

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/cff90dd8-8528-48fa-9234-403673359326%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Michael Gumowski | SonarSource
Software Developer, Language Team
https://www.sonarsource.com
Reply all
Reply to author
Forward
0 new messages