Commit f7f53b4a authored by Yannis LE BARS's avatar Yannis LE BARS Committed by Gerson SUNYE
Browse files

Fix Bugged rules avoidDollarSigns

parent 3f3fdf6b
...@@ -44,6 +44,7 @@ helper def: allMeasures(project : java!Model): Set(smm!Measure) = ...@@ -44,6 +44,7 @@ helper def: allMeasures(project : java!Model): Set(smm!Measure) =
-- Code Style rules -- Code Style rules
-- --
thisModule.avoidDollarSigns(),
thisModule.avoidPrefixingMethodParameters(), thisModule.avoidPrefixingMethodParameters(),
thisModule.extendsObject(), thisModule.extendsObject(),
thisModule.fieldDeclarationsShouldBeAtStartOfClass(), thisModule.fieldDeclarationsShouldBeAtStartOfClass(),
...@@ -132,7 +133,6 @@ helper def: allMeasures(project : java!Model): Set(smm!Measure) = ...@@ -132,7 +133,6 @@ helper def: allMeasures(project : java!Model): Set(smm!Measure) =
-- thisModule.emptyfinalizeMethod(), -- thisModule.emptyfinalizeMethod(),
-- thisModule.doNotThrowExceptionInFinally(), -- thisModule.doNotThrowExceptionInFinally(),
-- thisModule.finalizeShouldBeProtected(), -- thisModule.finalizeShouldBeProtected(),
-- thisModule.avoidDollarSigns(),
-- thisModule.returnEmptyArrayRatherThanNull(), -- thisModule.returnEmptyArrayRatherThanNull(),
-- thisModule.replaceVectorToList() -- thisModule.replaceVectorToList()
-- thisModule.unusedPrivateMethod () -- thisModule.unusedPrivateMethod ()
......
...@@ -5,7 +5,7 @@ library codestyle; ...@@ -5,7 +5,7 @@ library codestyle;
-- Rule for metrics AvoidDollarSigns : return the set of class Measures that violates the rule. -- Rule for metrics AvoidDollarSigns : return the set of class Measures that violates the rule.
helper def: avoidDollarSigns() : Set(smm!Measure) = helper def: avoidDollarSigns() : Set(smm!Measure) =
-- Browse through all variable/method/class/interface. -- 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)); ->collect(i | thisModule.MesureAvoidDollarSigns(i));
-- Rule for metrics shortMethodName : return the set of method Measures that violates the rule. -- Rule for metrics shortMethodName : return the set of method Measures that violates the rule.
...@@ -166,4 +166,4 @@ helper context java!ClassDeclaration def: isNotAllFieldsDeclaredAtStartOfClass() ...@@ -166,4 +166,4 @@ helper context java!ClassDeclaration def: isNotAllFieldsDeclaredAtStartOfClass()
endif endif
endif endif
) )
endif; endif;
\ No newline at end of file
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