Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ronan GUEGUEN
Source Code Analyzer
Commits
21a10dd2
Commit
21a10dd2
authored
Dec 21, 2019
by
Ronan GUEGUEN
Browse files
correction
parent
21ec2c22
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/atl/bestPractices.atl
View file @
21a10dd2
...
...
@@ -94,17 +94,8 @@ helper def: useAssertSameInsteadOfAssertTrue() : Set(smm!Measure) =
helper def: isWrongUseAssertSameInsteadOfAssertTrue(m:java!MethodInvocation) : Boolean =
--Browse through all arguments of the method assertTrue and see if == is used
(m.arguments->select(t|t.oclIsTypeOf(java!InfixExpression))->select(t|t.operator.toString() = '==')->collect(t|t).notEmpty())
;
(m.arguments->select(t|t.oclIsTypeOf(java!InfixExpression))->select(t|t.operator.toString() = '==')->collect(t|t).notEmpty());
----------------------------------------------UnusedLocalVariable----------------------------------------------------
helper def: unusedLocalVariable(): Set(smm!Measure) =
java!VariableDeclarationFragment.allInstances()
-> reject(variable | variable.usageInVariableAccess.isEmpty())
-> collect(variable | thisModule.MeasureUnusedLocalVariable(variable))
;
--------------------------------------------- ForLoopVariableCount ---------------------------------------------
-- Rule for metrics ForLoopVariableCount
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment