Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
naomod
Model Driven Engineering (MDE)
Source Code Analyzer
Commits
bd429a49
Commit
bd429a49
authored
Dec 21, 2019
by
Gerson Sunyé
Browse files
Merge
parents
cd290430
e82fe24e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/atl/analysis.atl
View file @
bd429a49
...
...
@@ -73,8 +73,7 @@ helper def: allMeasures(project : java!Model): Set(smm!Measure) =
thisModule.signatureDeclareThrowsException(),
thisModule.tooManyFields(),
thisModule.tooManyMethods(),
-- #FIXME:
-- thisModule.SimplifyBooleanAssertion(),
thisModule.SimplifyBooleanAssertion(),
-- Performance rules
--
...
...
src/main/atl/design.atl
View file @
bd429a49
...
...
@@ -135,6 +135,7 @@ helper def: ExcessiveClassLength() : Set(smm!Measure) =
helper def: SimplifyBooleanAssertion() : Set(java!PrefixExpression) =
java!PrefixExpression.allInstances()
-> select(i | i.operator.toString() = '!')
-> select(i | i.eContainer().oclIsTypeOf(java!MethodInvocation))
-> select(i | i.eContainer().method.name = 'assertTrue' or i.eContainer().method.name = 'assertFalse')
-> collect(i | thisModule.MeasureSimplifyBooleanAssertion(i));
...
...
Write
Preview
Markdown
is supported
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