Commit b46d78d0 authored by Gerson SUNYE's avatar Gerson SUNYE
Browse files

Merge branch 'master' into 'master'

Fix Bugged rules avoidDollarSigns

See merge request naomod/mde/projet-2019!130
parents 3f3fdf6b f7f53b4a
......@@ -44,6 +44,7 @@ helper def: allMeasures(project : java!Model): Set(smm!Measure) =
-- Code Style rules
--
thisModule.avoidDollarSigns(),
thisModule.avoidPrefixingMethodParameters(),
thisModule.extendsObject(),
thisModule.fieldDeclarationsShouldBeAtStartOfClass(),
......@@ -132,7 +133,6 @@ helper def: allMeasures(project : java!Model): Set(smm!Measure) =
-- thisModule.emptyfinalizeMethod(),
-- thisModule.doNotThrowExceptionInFinally(),
-- thisModule.finalizeShouldBeProtected(),
-- thisModule.avoidDollarSigns(),
-- thisModule.returnEmptyArrayRatherThanNull(),
-- thisModule.replaceVectorToList()
-- thisModule.unusedPrivateMethod ()
......
......@@ -5,7 +5,7 @@ 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())->select(i | i.name.indexOf('$') <> -1)
java!TypeDeclaration.allInstances()->union(java!MethodDeclaration.allInstances())->union(java!VariableDeclaration.allInstances())-> reject(each | each.isProxy())->select(i | i.name.indexOf('$') <> -1)
->collect(i | thisModule.MesureAvoidDollarSigns(i));
-- Rule for metrics shortMethodName : return the set of method Measures that violates the rule.
......
Markdown is supported
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