forked from mozilla/rhino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spotbugs-exclude.xml
139 lines (136 loc) · 4.61 KB
/
spotbugs-exclude.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version="1.0" encoding="UTF-8" ?>
<FindBugsFilter>
<!-- In general, do not run this on tests or generated benchmark classes -->
<Match>
<Source name="~.*\/testsrc\/.*"/>
</Match>
<Match>
<Source name="~.*\\testsrc\\.*"/>
</Match>
<Match>
<Source name="~.*\/examples\/.*"/>
</Match>
<Match>
<Source name="~.*\\examples\\.*"/>
</Match>
<Match>
<Class name="~org\.mozilla\.javascript\.benchmarks\.jmh_generated.*"/>
</Match>
<!-- Things below are legit exemptions -->
<Match>
<!-- Existing "Token" constants have values to 255 -->
<Class name="org.mozilla.javascript.Interpreter" />
<Bug pattern="INT_BAD_COMPARISON_WITH_SIGNED_BYTE" />
</Match>
<Match>
<!-- Let this class do its job -->
<Class name="org.mozilla.javascript.DToA" />
<Bug pattern="FE_FLOATING_POINT_EQUALITY" />
</Match>
<Match>
<!-- A bigger task to take this on across the codebase -->
<Bug pattern="DM_DEFAULT_ENCODING" />
</Match>
<Match>
<!-- SymbolKey and NativeSymbol objects may be compared directly. -->
<Class name="org.mozilla.javascript.SymbolKey"/>
<Bug pattern="EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS" />
</Match>
<Match>
<!-- SymbolKey and NativeSymbol objects may be compared directly. -->
<Class name="org.mozilla.javascript.NativeSymbol"/>
<Bug pattern="EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS" />
</Match>
<Match>
<!-- Legacy code depends on being able to reassign values in Main -->
<Class name="org.mozilla.javascript.tools.shell.Main"/>
<Bug pattern="MS_SHOULD_BE_FINAL"/>
</Match>
<Match>
<!-- Legacy code depends on being able to reassign values in Main -->
<Class name="org.mozilla.javascript.tools.shell.Main"/>
<Bug pattern="MS_PKGPROTECT"/>
</Match>
<Match>
<!-- GUI code just loves to swallow exceptions -->
<Class name="org.mozilla.javascript.tools.debugger.SwingGui"/>
<Bug pattern="DE_MIGHT_IGNORE"/>
</Match>
<Match>
<!-- In general, the tools need to exit -->
<Class name="~org\.mozilla\.javascript\.tools.*"/>
<Bug pattern="DM_EXIT"/>
</Match>
<Match>
<!-- Fixing this would break our public API -->
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
<Match>
<!-- We do this in a few places for performance in legacy code -->
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<!-- We check for this in checkstyle using a different annotation -->
<Bug pattern="SF_SWITCH_FALLTHROUGH"/>
</Match>
<Match>
<!-- We check for this in checkstyle using a different annotation -->
<Bug pattern="SF_SWITCH_NO_DEFAULT"/>
</Match>
<Match>
<!-- Fixing this would break "DEBUG" -->
<Class name="org.mozilla.javascript.optimizer.Block"/>
<Bug pattern="UUF_UNUSED_FIELD"/>
</Match>
<Match>
<!-- Fixing this would break "DEBUG" -->
<Class name="org.mozilla.javascript.regexp.NativeRegExp"/>
<Bug pattern="DLS_DEAD_LOCAL_STORE"/>
</Match>
<Match>
<!-- This is kind of a weird thing that's necessary for the security manager -->
<Class name="org.mozilla.javascript.tools.shell.JavaPolicySecurity"/>
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
</Match>
<Match>
<!-- And this is a weird thing related to maybe multithreading the GUI -->
<Class name="org.mozilla.javascript.tools.debugger.Dim"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>
<Match>
<!-- Referenced in generated code -->
<Class name="org.mozilla.javascript.optimizer.OptRuntime$GeneratorState"/>
<Bug pattern="UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD"/>
</Match>
<Match>
<!-- Referenced in generated code -->
<Class name="org.mozilla.javascript.optimizer.OptRuntime$GeneratorState"/>
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"/>
</Match>
<!-- Complex legacy stuff -->
<!--<Match>
<Class name="org.mozilla.javascript.regexp.RegExpImpl"/>
<Bug pattern="RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN"/>
</Match>-->
<!-- Things below are things that we aspire to fix! -->
<Match>
<!-- We are planning to eliminate serialization -->
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<Match>
<!-- We are planning to eliminate serialization -->
<Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED"/>
</Match>
<Match>
<!-- We are planning to get rid of synchronization -->
<Bug pattern="DC_DOUBLECHECK"/>
</Match>
<Match>
<!-- We are planning to get rid of synchronization -->
<Bug pattern="IS2_INCONSISTENT_SYNC"/>
</Match>
<Match>
<!-- We are planning to get rid of synchronization -->
<Bug pattern="UG_SYNC_SET_UNSYNC_GET"/>
</Match>
</FindBugsFilter>