vs13
2015-01-27 01:54:54 UTC
Hi,
I am trying to use Sonar for searching code smells in a project. Many code
metrics map directly to some code smells while some map indirectly. An
example of a code smell that is easy to detect is Duplicated Code which can
be found by looking at code metrics like duplicated blocks, duplicated files
and duplicated lines which are already a part of code metrics. Another
example of a code smell that is difficult to detect would be Feature Envy
that is defined when a method is more interested in a class other than the
one it is actually in. Earlier version of Sonar had a metric called Lack Of
Cohesion Methods IV (LCOM4) which could be an indicator of Feature Envy but
this metric is not present in recent versions.
There is a list of such code smells
* Refused Bequest
* Data Class
* Shotgun Surgery
* Lazy Class
* Temporary Field
* Divergent Change
* Data Clumps
* Parallel Inheritance Hierarchies
* Speculative Generality
* Message Chains
* Middle Man
* Inappropriate Intimacy
Does Sonar have something i can use for code smells directly without going
into searching in detail how a code smell would map to an existing metric?
Has anyone used Sonar to detect code smells?
Thanks!
--
View this message in context: http://sonarqube.15.x6.nabble.com/Code-Smell-Detection-using-Sonar-tp5031932.html
Sent from the SonarQube Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
I am trying to use Sonar for searching code smells in a project. Many code
metrics map directly to some code smells while some map indirectly. An
example of a code smell that is easy to detect is Duplicated Code which can
be found by looking at code metrics like duplicated blocks, duplicated files
and duplicated lines which are already a part of code metrics. Another
example of a code smell that is difficult to detect would be Feature Envy
that is defined when a method is more interested in a class other than the
one it is actually in. Earlier version of Sonar had a metric called Lack Of
Cohesion Methods IV (LCOM4) which could be an indicator of Feature Envy but
this metric is not present in recent versions.
There is a list of such code smells
* Refused Bequest
* Data Class
* Shotgun Surgery
* Lazy Class
* Temporary Field
* Divergent Change
* Data Clumps
* Parallel Inheritance Hierarchies
* Speculative Generality
* Message Chains
* Middle Man
* Inappropriate Intimacy
Does Sonar have something i can use for code smells directly without going
into searching in detail how a code smell would map to an existing metric?
Has anyone used Sonar to detect code smells?
Thanks!
--
View this message in context: http://sonarqube.15.x6.nabble.com/Code-Smell-Detection-using-Sonar-tp5031932.html
Sent from the SonarQube Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email