Commit 3d9239df authored by Yannis LE BARS's avatar Yannis LE BARS
Browse files

Correction et amélioration de la règle avoidDollarSigns

parent bdf26fc5
......@@ -5,13 +5,8 @@ library codestyle;
-- Rule for metrics AvoidDollarSigns : return the set of class Measures that violates the rule.
helper def: avoidDollarSigns() : Set(smm!Measure) =
-- Browse through all variable/method/class/interface.
java!TypeDeclaration.allInstances()->union(java!MethodDeclaration.allInstances())->union(java!VariableDeclaration.allInstances())->iterate(i; res : Set(smm!Measure) = Set{} |
-- Add a new measurement if the name contains a dollar.
if'$') <> -1
then res->union(Set{thisModule.MesureAvoidDollarSigns(i)})
else res
java!TypeDeclaration.allInstances()->union(java!MethodDeclaration.allInstances())->union(java!VariableDeclaration.allInstances())->select(i |'$') <> -1)
->collect(i | thisModule.MesureAvoidDollarSigns(i));
-- Rule for metrics shortMethodName : return the set of method Measures that violates the rule.
helper def: shortMethodName() : Set(smm!Measure) =
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment