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
Roxane MARECHAL
Source Code Analyzer
Commits
b5e231fc
Commit
b5e231fc
authored
Dec 22, 2019
by
Roxane Kang Maréchal
Browse files
Improved comment for helpers and rules related to TooFewBranchesForASwitchStatement
parent
ad4f304f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/atl/analysis.atl
View file @
b5e231fc
...
...
@@ -1440,7 +1440,7 @@ rule MeasureTestClassWithoutTest(w: java!CompilationUnit) {
}
}
--- Rule that creates an instance of Measure
for the
switch statement
with
too few branches
passed in parameter
--- Rule that creates an instance of Measure
when a
switch statement
has
too few branches
rule MeasureTooFewBranchesForASwitchStatement(switchStatement: java!SwitchStatement) {
to
om: smm!ObservedMeasure (
...
...
src/main/atl/performance.atl
View file @
b5e231fc
...
...
@@ -12,8 +12,7 @@ helper def: uselessStringValueOf() : Set(smm!Measure) =
------------------------------------ TooFewBranchesForASwitchStatement--------------------------------------
-- Returns a set of measures for each switch statement that violates the rule : number of switch cases < 3
-- To test, use input model : tooFewBranchesForASwitchStatement.xmi
--- Returns a set of measures for each switch statement that contains less than 3 switch cases
helper def: tooFewBranchesForASwitchStatement(): Set(smm!Measure) =
-- If the number of switch cases for the current switch statement is < 3 then add a new measure to the set
java!SwitchStatement.allInstances()
...
...
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