• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moosetechnology / MooseIDE / 21818695493

09 Feb 2026 09:02AM UTC coverage: 65.926% (+0.1%) from 65.829%
21818695493

push

github

web-flow
Merge pull request #1588 from moosetechnology/dead-code-heuristic-groups

Dead code heuristic groups

508 of 568 new or added lines in 21 files covered. (89.44%)

21882 of 33192 relevant lines covered (65.93%)

1.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/src/MooseIDE-DeadCode/MiDeadJavaHasOverridingRule.class.st
1
"
2
A method having an ""@Override"" sub-method (in a subclass) is assumed not-dead,
3
because one cannot remove the overriden method
4
(@Override makes it mandatory to have a super-method)
5
"
6
Class {
7
        #name : 'MiDeadJavaHasOverridingRule',
8
        #superclass : 'MiDeadAbstractJavaRule',
9
        #category : 'MooseIDE-DeadCode-Rules',
10
        #package : 'MooseIDE-DeadCode',
11
        #tag : 'Rules'
12
}
13

14
{ #category : 'testing' }
15
MiDeadJavaHasOverridingRule >> any: tWithMethods hasOverrideMethod: aTMethod [
2✔
16

2✔
17
        ^tWithMethods anySatisfy: [ :aTWithMethods |
2✔
18
                self container: aTWithMethods hasOverrideMethod: aTMethod
2✔
19
        ]
2✔
20
]
2✔
21

22
{ #category : 'testing' }
23
MiDeadJavaHasOverridingRule >> container: aTWithMethods hasOverrideMethod: aTMethod [
2✔
24

2✔
25
        ^aTWithMethods methods
2✔
26
                anySatisfy: [ :mth |
2✔
27
                        (mth signature = aTMethod signature) and:
2✔
28
                        [ self hasOverrideAnnotation: mth ]
2✔
29
        ]
2✔
30
]
2✔
31

32
{ #category : 'accessing' }
NEW
33
MiDeadJavaHasOverridingRule >> description [
×
34

×
35
        ^super description ,
×
36
                'A method having an "@Overriding" method (in a subclass) is assumed not-dead,
×
37
because one cannot remove the overriden method'
×
38
]
×
39

40
{ #category : 'testing' }
41
MiDeadJavaHasOverridingRule >> hasOverrideAnnotation: anEntity [
2✔
42

2✔
43
        ^anEntity annotationInstances anySatisfy: [ :anno |
2✔
44
                anno annotationType mooseName = 'java.lang.Override'
2✔
45
        ]
2✔
46
]
2✔
47

48
{ #category : 'accessing' }
49
MiDeadJavaHasOverridingRule >> name [
2✔
50

2✔
51
        ^super name , 'Has @Overriding sub-method'
2✔
52
]
2✔
53

54
{ #category : 'testing' }
55
MiDeadJavaHasOverridingRule >> notDead: aTMethod [
2✔
56

2✔
57
        ^self
2✔
58
                any: aTMethod parentType subclassHierarchy
2✔
59
                hasOverrideMethod: aTMethod
2✔
60
]
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc