Commit 03107e51 authored by Arthur Liégeois's avatar Arthur Liégeois 🍆 Committed by Gerson SUNYE
Browse files

Rule #618 fixed

parent bd429a49
...@@ -123,7 +123,7 @@ helper def: allMeasures(project : java!Model): Set(smm!Measure) = ...@@ -123,7 +123,7 @@ helper def: allMeasures(project : java!Model): Set(smm!Measure) =
thisModule.UseProperClassLoader(), thisModule.UseProperClassLoader(),
-- Best practices rules -- Best practices rules
-- #FIXME: thisModule.avoidReassigningParameters(), thisModule.avoidReassigningParameters(),
thisModule.avoidStringBufferField(), thisModule.avoidStringBufferField(),
thisModule.forLoopVariableCount(), thisModule.forLoopVariableCount(),
thisModule.switchDensity(), thisModule.switchDensity(),
......
...@@ -122,7 +122,7 @@ helper context java!VariableDeclarationExpression def: nbLocalVariableDeclaratio ...@@ -122,7 +122,7 @@ helper context java!VariableDeclarationExpression def: nbLocalVariableDeclaratio
helper def: avoidReassigningParameters(): Set(smm!Measure) = helper def: avoidReassigningParameters(): Set(smm!Measure) =
java!AbstractMethodDeclaration.allInstances()->select(method | java!AbstractMethodDeclaration.allInstances()->select(method |
method.parameters.size() > 0 -- need at least 1 parameter method.parameters.size() > 0 and not method.body.oclIsUndefined() -- need at least one parameter and a body
)->collect(method | )->collect(method |
method.body.statements->select(statement | method.body.statements->select(statement |
statement.oclIsTypeOf(java!ExpressionStatement) -- statement must be an expression statement.oclIsTypeOf(java!ExpressionStatement) -- statement must be an expression
......
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