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

moosetechnology / MooseIDE / 19293659590

12 Nov 2025 10:05AM UTC coverage: 65.543% (-0.3%) from 65.828%
19293659590

Pull #1516

github

web-flow
Merge 8fbb6dd86 into d13695561
Pull Request #1516: Dead code java rules

142 of 325 new or added lines in 10 files covered. (43.69%)

21293 of 32487 relevant lines covered (65.54%)

1.31 hits per line

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

80.49
/src/MooseIDE-DeadCode/MiDeadCodeAbstractHeuristic.class.st
1
"
2
An abstract class for heurisitcs identifying dead behavioural entities
3

4
An heurisitc can try to identifiy dead entities or identify not-dead entities (refuting dead entities)
5
In the first case, #isDead: = true means the entity is dead, = false means 'undecided'
6
In the second case, #isDead: = false means the entity is not dead, = true means 'undecided'
7

8

9
A heurisitc has:
10
- a name
11
- a description
12
- #isDead: method that accept an entity and answers a boolean
13
- #refuteDead: true if the heuristic tries to prove that an entity is dead
14
"
15
Class {
16
        #name : 'MiDeadCodeAbstractHeuristic',
17
        #superclass : 'Object',
18
        #category : 'MooseIDE-DeadCode-Rules',
19
        #package : 'MooseIDE-DeadCode',
20
        #tag : 'Rules'
21
}
22

23
{ #category : 'testing' }
24
MiDeadCodeAbstractHeuristic class >> isAbstract [
2✔
25

2✔
26
        ^self name includesSubstring: 'Abstract'
2✔
27
]
2✔
28

29
{ #category : 'accessing' }
30
MiDeadCodeAbstractHeuristic >> description [
2✔
31

2✔
32
        ^self refuteDead
2✔
33
                ifTrue: [ '[Refute a method is dead]' , String cr ]
2✔
34
                ifFalse: [ '' ]
2✔
35
]
2✔
36

37
{ #category : 'testing' }
38
MiDeadCodeAbstractHeuristic >> isAbstract [
×
39

×
40
        ^ self class isAbstract
×
41
]
×
42

43
{ #category : 'testing' }
44
MiDeadCodeAbstractHeuristic >> isDead: aTMethod [
2✔
45

2✔
46
        ^self refuteDead
2✔
47
                ifTrue: [ (self notDead: aTMethod) not ]
2✔
48
                ifFalse: [ self subclassResponsibility ]
2✔
49
]
2✔
50

51
{ #category : 'accessing' }
NEW
52
MiDeadCodeAbstractHeuristic >> isForEntryPoint [
×
NEW
53

×
NEW
54
        ^false
×
NEW
55
]
×
56

57
{ #category : 'accessing' }
58
MiDeadCodeAbstractHeuristic >> name [
2✔
59

2✔
60
        ^self selectedByDefault
2✔
61
                ifTrue: [ '[Default] ' ]
2✔
62
                ifFalse: [ '' ]
2✔
63
]
2✔
64

65
{ #category : 'testing' }
66
MiDeadCodeAbstractHeuristic >> notDead: aTMethod [
67

68
        self subclassResponsibility 
69
]
70

71
{ #category : 'accessing' }
72
MiDeadCodeAbstractHeuristic >> refuteDead [
2✔
73
        "if true, the heuristic tries to _refute_ a method is dead (or assert it is not dead)
2✔
74
         if false, the heuristic tries to _assert_ a method is dead"
2✔
75

2✔
76
        ^true
2✔
77
]
2✔
78

79
{ #category : 'testing' }
80
MiDeadCodeAbstractHeuristic >> selectedByDefault [
2✔
81
        "Whether the heuristic is selected in the DeadCodeBrowser by default"
2✔
82

2✔
83
        ^false
2✔
84
]
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc