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

moosetechnology / MooseIDE / 19293949353

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

push

github

web-flow
Merge pull request #1516 from moosetechnology/dead-code-java-rules

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

34.62
/src/MooseIDE-DeadCode/MiDeadCodeJavaMainHeuristic.class.st
1
"
2
A heuristic to recognize 'public static void main()' function in Java
3
"
4
Class {
5
        #name : 'MiDeadCodeJavaMainHeuristic',
6
        #superclass : 'MiDeadCodeAbstractJavaHeuristic',
7
        #category : 'MooseIDE-DeadCode-Rules',
8
        #package : 'MooseIDE-DeadCode',
9
        #tag : 'Rules'
10
}
11

12
{ #category : 'testing' }
NEW
13
MiDeadCodeJavaMainHeuristic >> accept: aTMethod [
×
NEW
14

×
NEW
15
        ^self notDead: aTMethod 
×
NEW
16
]
×
17

18
{ #category : 'accessing' }
19
MiDeadCodeJavaMainHeuristic >> description [
2✔
20

2✔
21
        ^super description ,
2✔
22
        '"public static void main()" methods are assumed not-dead'
2✔
23
]
2✔
24

25
{ #category : 'accessing' }
NEW
26
MiDeadCodeJavaMainHeuristic >> isForEntryPoint [
×
NEW
27

×
NEW
28
        ^true
×
NEW
29
]
×
30

31
{ #category : 'accessing' }
32
MiDeadCodeJavaMainHeuristic >> name [
2✔
33

2✔
34
        ^super name , 'main()'
2✔
35
]
2✔
36

37
{ #category : 'testing' }
38
MiDeadCodeJavaMainHeuristic >> notDead: aTMethod [
×
39

×
40
        (aTMethod name = 'main') ifFalse: [ ^false ].
×
41
        aTMethod declaredType ifNil: [ ^false ].
×
42
        (aTMethod declaredType name = 'void') ifNil: [ ^false ].
×
43
        aTMethod isClassSide ifFalse: [ ^false ].
×
44

×
45
        ^true
×
46
]
×
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