[JAVA] Checkstyle - Missing Override - FP for JDK5

56 views
Skip to first unread message

Adam Gabryś

unread,
Dec 9, 2015, 5:03:23 PM12/9/15
to SonarQube
Hi,
I know there is a problem with SQUID:1161 (“@Override” annotation should be used on any method) and JDK5: https://jira.sonarsource.com/browse/SONARJAVA-818
 
I will be nice, if you (after fix it) also dynamicaly set “javaFiveCompatibility” parameter to true (JDK5) or false (JDK6+).
 
 
Regards,
    Adam Gabryś

Adam Gabryś

unread,
Dec 9, 2015, 5:11:17 PM12/9/15
to SonarQube
I forgot. It would also be nice if you correct squid:UndocumentedApi (http://nemo.sonarqube.org/coding_rules#q=UndocumentedApi) rule for JDK5 (ignore if method is defined and documented in parent).
 
Regards,
    Adam Gabryś
--
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/DUB124-DS26E59CF586B4D37B126BE98E80%40phx.gbl.
For more options, visit https://groups.google.com/d/optout.

Nicolas Peru

unread,
Dec 11, 2015, 11:07:58 AM12/11/15
to Adam Gabryś, SonarQube
Hi Adam, 

You have two requests here : 
  • Can we improve checkstyle plugin so we set parameters depending on the sonar.java.sources propery ? Short answer is no. We actually won't go for implementation of this from SonarSource. This is definitely not a priority on our side. However, feel free to contribute and propose a pull request for this feature. 
  • Can we update UndocumentedApi rule to behave differently depending on java version ? Would you mind precising how you think the rule should behave ? 
Cheers, 

Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


Adam Gabryś

unread,
Dec 13, 2015, 5:59:43 PM12/13/15
to Nicolas Peru, SonarQube
Hi,
1) Ok. I understand and I will try ;-)
 
2) If we use JDK5, we can not make decisions based on @Override annotations. It will be nice, if the rule check only those methods which are not override (not available in parent class or implemented interfaces).
 
By the way I would like to point out that this rule also create issues for not documented public methods i private/package classes and interfaces (http://stackoverflow.com/questions/31463950/how-to-resolve-squidundocumentedapi-on-public-method-in-package-classes).
 
Regards,
    Adam Gabryś
Reply all
Reply to author
Forward
0 new messages