Patroklos Papapetrou
2014-10-08 09:30:08 UTC
Hi everyone
AFAIK , Sonarqube can report on many cases of unused code.
For Java :
http://nemo.sonarqube.org/coding_rules#q=unused|qprofile=java-sonar-way-with-findbugs-93000|activation=true|languages=java
For C :
http://nemo.sonarqube.org/coding_rules#q=unused|qprofile=c-sonar-way-44762|languages=c
Most of them are related to private or protected fields or private methods
that are not used.
We are very interesting on finding unused or un-referenced code within a
project. This practically means that even public methods that are not
references should be reported.
I know that this kind of rule has several concerns ( at least for Java ) .
I've been through several projects where frameworks demand the existence of
public or protected methods for injection purposes so I understand that
many false-positives might be created. So this rule should be highly
customizable which is against the philosophy of SonarQube rules ( make them
as simple as it gets )
To stop thinking aloud, are there any plans for such kind of rule, or any
ideas on how it could be implemented? Does this rule make sense to other
languages like C or C#
Any thoughts are greatly appreciated
Thanks,
Patroklos Papapetrou
SoftwareGarden.io
Linkedin <http://www.linkedin.com/in/ppapapetrou> | Twitter
<http://twitter.com/ppapapetrou76> | *Author
<http://softwaregarden.io/my-books> *| Speaker
<http://lanyrd.com/profile/ppapapetrou/> | Blog <http://softwaregarden.io>
| Google+ <https://plus.google.com/+PatroklosPapapetrou> | GitHub
<https://github.com/ppapapetrou76> |
AFAIK , Sonarqube can report on many cases of unused code.
For Java :
http://nemo.sonarqube.org/coding_rules#q=unused|qprofile=java-sonar-way-with-findbugs-93000|activation=true|languages=java
For C :
http://nemo.sonarqube.org/coding_rules#q=unused|qprofile=c-sonar-way-44762|languages=c
Most of them are related to private or protected fields or private methods
that are not used.
We are very interesting on finding unused or un-referenced code within a
project. This practically means that even public methods that are not
references should be reported.
I know that this kind of rule has several concerns ( at least for Java ) .
I've been through several projects where frameworks demand the existence of
public or protected methods for injection purposes so I understand that
many false-positives might be created. So this rule should be highly
customizable which is against the philosophy of SonarQube rules ( make them
as simple as it gets )
To stop thinking aloud, are there any plans for such kind of rule, or any
ideas on how it could be implemented? Does this rule make sense to other
languages like C or C#
Any thoughts are greatly appreciated
Thanks,
Patroklos Papapetrou
SoftwareGarden.io
Linkedin <http://www.linkedin.com/in/ppapapetrou> | Twitter
<http://twitter.com/ppapapetrou76> | *Author
<http://softwaregarden.io/my-books> *| Speaker
<http://lanyrd.com/profile/ppapapetrou/> | Blog <http://softwaregarden.io>
| Google+ <https://plus.google.com/+PatroklosPapapetrou> | GitHub
<https://github.com/ppapapetrou76> |