Skip to content

Commit 6a0cd70

Browse files
author
Jon Iles
committed
Findbugs configuration
1 parent d0aaa45 commit 6a0cd70

File tree

4 files changed

+246
-0
lines changed

4 files changed

+246
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/mpxj.jar
33
/.fbprefs
44

5+
/classes

.project

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@
1515
<arguments>
1616
</arguments>
1717
</buildCommand>
18+
<buildCommand>
19+
<name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
1823
</buildSpec>
1924
<natures>
2025
<nature>org.eclipse.jdt.core.javanature</nature>
2126
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
27+
<nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
2228
</natures>
2329
</projectDescription>
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
#FindBugs User Preferences
2+
#Sun Feb 23 16:21:32 GMT 2014
3+
cloud_id=edu.umd.cs.findbugs.cloud.doNothingCloud
4+
detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
5+
detectorAtomicityProblem=AtomicityProblem|true
6+
detectorBadAppletConstructor=BadAppletConstructor|false
7+
detectorBadResultSetAccess=BadResultSetAccess|true
8+
detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
9+
detectorBadUseOfReturnValue=BadUseOfReturnValue|true
10+
detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
11+
detectorBooleanReturnNull=BooleanReturnNull|true
12+
detectorCallToUnsupportedMethod=CallToUnsupportedMethod|false
13+
detectorCheckExpectedWarnings=CheckExpectedWarnings|false
14+
detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
15+
detectorCheckRelaxingNullnessAnnotation=CheckRelaxingNullnessAnnotation|true
16+
detectorCheckTypeQualifiers=CheckTypeQualifiers|true
17+
detectorCloneIdiom=CloneIdiom|true
18+
detectorComparatorIdiom=ComparatorIdiom|true
19+
detectorConfusedInheritance=ConfusedInheritance|true
20+
detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
21+
detectorCrossSiteScripting=CrossSiteScripting|true
22+
detectorDefaultEncodingDetector=DefaultEncodingDetector|true
23+
detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
24+
detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
25+
detectorDontIgnoreResultOfPutIfAbsent=DontIgnoreResultOfPutIfAbsent|true
26+
detectorDontUseEnum=DontUseEnum|true
27+
detectorDroppedException=DroppedException|true
28+
detectorDumbMethodInvocations=DumbMethodInvocations|true
29+
detectorDumbMethods=DumbMethods|true
30+
detectorDuplicateBranches=DuplicateBranches|true
31+
detectorEmptyZipFileEntry=EmptyZipFileEntry|false
32+
detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
33+
detectorExplicitSerialization=ExplicitSerialization|true
34+
detectorFinalizerNullsFields=FinalizerNullsFields|true
35+
detectorFindBadCast2=FindBadCast2|true
36+
detectorFindBadForLoop=FindBadForLoop|true
37+
detectorFindCircularDependencies=FindCircularDependencies|false
38+
detectorFindDeadLocalStores=FindDeadLocalStores|true
39+
detectorFindDoubleCheck=FindDoubleCheck|true
40+
detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
41+
detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
42+
detectorFindFinalizeInvocations=FindFinalizeInvocations|true
43+
detectorFindFloatEquality=FindFloatEquality|true
44+
detectorFindHEmismatch=FindHEmismatch|true
45+
detectorFindInconsistentSync2=FindInconsistentSync2|true
46+
detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
47+
detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
48+
detectorFindMaskedFields=FindMaskedFields|true
49+
detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
50+
detectorFindNakedNotify=FindNakedNotify|true
51+
detectorFindNonShortCircuit=FindNonShortCircuit|true
52+
detectorFindNullDeref=FindNullDeref|true
53+
detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
54+
detectorFindOpenStream=FindOpenStream|true
55+
detectorFindPuzzlers=FindPuzzlers|true
56+
detectorFindRefComparison=FindRefComparison|true
57+
detectorFindReturnRef=FindReturnRef|true
58+
detectorFindRunInvocations=FindRunInvocations|true
59+
detectorFindSelfComparison=FindSelfComparison|true
60+
detectorFindSelfComparison2=FindSelfComparison2|true
61+
detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
62+
detectorFindSpinLoop=FindSpinLoop|true
63+
detectorFindSqlInjection=FindSqlInjection|true
64+
detectorFindTwoLockWait=FindTwoLockWait|true
65+
detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
66+
detectorFindUnconditionalWait=FindUnconditionalWait|true
67+
detectorFindUninitializedGet=FindUninitializedGet|true
68+
detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
69+
detectorFindUnreleasedLock=FindUnreleasedLock|true
70+
detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
71+
detectorFindUnsyncGet=FindUnsyncGet|true
72+
detectorFindUseOfNonSerializableValue=FindUseOfNonSerializableValue|true
73+
detectorFindUselessControlFlow=FindUselessControlFlow|true
74+
detectorFormatStringChecker=FormatStringChecker|true
75+
detectorHugeSharedStringConstants=HugeSharedStringConstants|true
76+
detectorIDivResultCastToDouble=IDivResultCastToDouble|true
77+
detectorIncompatMask=IncompatMask|true
78+
detectorInconsistentAnnotations=InconsistentAnnotations|true
79+
detectorInefficientMemberAccess=InefficientMemberAccess|false
80+
detectorInefficientToArray=InefficientToArray|true
81+
detectorInfiniteLoop=InfiniteLoop|true
82+
detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
83+
detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
84+
detectorInitializationChain=InitializationChain|true
85+
detectorInitializeNonnullFieldsInConstructor=InitializeNonnullFieldsInConstructor|true
86+
detectorInstantiateStaticClass=InstantiateStaticClass|true
87+
detectorIntCast2LongAsInstant=IntCast2LongAsInstant|true
88+
detectorInvalidJUnitTest=InvalidJUnitTest|true
89+
detectorIteratorIdioms=IteratorIdioms|true
90+
detectorLazyInit=LazyInit|true
91+
detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
92+
detectorLostLoggerDueToWeakReference=LostLoggerDueToWeakReference|true
93+
detectorMethodReturnCheck=MethodReturnCheck|true
94+
detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
95+
detectorMutableLock=MutableLock|true
96+
detectorMutableStaticFields=MutableStaticFields|true
97+
detectorNaming=Naming|true
98+
detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true
99+
detectorNumberConstructor=NumberConstructor|true
100+
detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
101+
detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
102+
detectorPublicSemaphores=PublicSemaphores|false
103+
detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
104+
detectorReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass=ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass|true
105+
detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
106+
detectorRedundantInterfaces=RedundantInterfaces|true
107+
detectorRepeatedConditionals=RepeatedConditionals|true
108+
detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
109+
detectorSerializableIdiom=SerializableIdiom|true
110+
detectorStartInConstructor=StartInConstructor|true
111+
detectorStaticCalendarDetector=StaticCalendarDetector|true
112+
detectorStringConcatenation=StringConcatenation|true
113+
detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
114+
detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
115+
detectorSwitchFallthrough=SwitchFallthrough|true
116+
detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
117+
detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
118+
detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
119+
detectorURLProblems=URLProblems|true
120+
detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
121+
detectorUnnecessaryMath=UnnecessaryMath|true
122+
detectorUnreadFields=UnreadFields|true
123+
detectorUselessSubclassMethod=UselessSubclassMethod|false
124+
detectorVarArgsProblems=VarArgsProblems|true
125+
detectorVolatileUsage=VolatileUsage|true
126+
detectorWaitInLoop=WaitInLoop|true
127+
detectorWrongMapIterator=WrongMapIterator|true
128+
detectorXMLFactoryBypass=XMLFactoryBypass|true
129+
detector_threshold=3
130+
effort=default
131+
excludefilter0=findbugs-exclude.xml|true
132+
filter_settings=Low|BAD_PRACTICE,CORRECTNESS,MT_CORRECTNESS,PERFORMANCE,STYLE|false|20
133+
filter_settings_neg=MALICIOUS_CODE,NOISE,I18N,SECURITY,EXPERIMENTAL|
134+
run_at_full_build=false

findbugs-exclude.xml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<FindBugsFilter>
2+
3+
<!-- Deal with these using try with resources and Java 7 -->
4+
<Match>
5+
<Bug pattern="OS_OPEN_STREAM_EXCEPTION_PATH" />
6+
</Match>
7+
8+
<!-- Don't check generated code -->
9+
<Match>
10+
<Class name="~.*\.schema\..*" />
11+
</Match>
12+
13+
<!-- This detector compares our code with generated code in the schema classes, producing spurious warnings -->
14+
<Match>
15+
<Bug pattern="NM_CONFUSING" />
16+
</Match>
17+
18+
<!-- We'll allow catch (Exception ex) -->
19+
<Match>
20+
<Bug pattern="REC_CATCH_EXCEPTION" />
21+
</Match>
22+
23+
<!-- We're happy with this cast -->
24+
<Match>
25+
<Bug pattern="BC_UNCONFIRMED_CAST" />
26+
<Class name="~.*\.ResourceAssignment" />
27+
<Method name="set" />
28+
</Match>
29+
30+
<!-- We're happy with this cast -->
31+
<Match>
32+
<Bug pattern="BC_UNCONFIRMED_CAST" />
33+
<Class name="~.*\.Resource" />
34+
<Method name="getCurrentValue" />
35+
</Match>
36+
37+
<!-- We're happy with this cast -->
38+
<Match>
39+
<Bug pattern="BC_UNCONFIRMED_CAST" />
40+
<Class name="~.*\.Resource" />
41+
<Method name="set" />
42+
</Match>
43+
44+
<!-- We're happy with this cast -->
45+
<Match>
46+
<Bug pattern="BC_UNCONFIRMED_CAST" />
47+
<Class name="~.*\.Task" />
48+
<Method name="getCurrentValue" />
49+
</Match>
50+
51+
<!-- We're happy with this cast -->
52+
<Match>
53+
<Bug pattern="BC_UNCONFIRMED_CAST" />
54+
<Class name="~.*\.Task" />
55+
<Method name="set" />
56+
</Match>
57+
58+
<!-- Findbugs and Eclipse disagree on this one -->
59+
<Match>
60+
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE" />
61+
<Class name="~.*\.ProjectCalendar" />
62+
</Match>
63+
64+
<!-- Doesn't produce particularly useful results -->
65+
<Match>
66+
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" />
67+
</Match>
68+
69+
<Match>
70+
<Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" />
71+
</Match>
72+
73+
<Match>
74+
<Bug pattern="SE_NO_SERIALVERSIONID" />
75+
</Match>
76+
77+
<Match>
78+
<Bug pattern="SR_NOT_CHECKED" />
79+
</Match>
80+
81+
<Match>
82+
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
83+
</Match>
84+
85+
<Match>
86+
<Bug pattern="RR_NOT_CHECKED" />
87+
</Match>
88+
89+
<Match>
90+
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" />
91+
</Match>
92+
93+
<Match>
94+
<Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
95+
</Match>
96+
97+
<Match>
98+
<Bug pattern="DE_MIGHT_IGNORE" />
99+
</Match>
100+
101+
<Match>
102+
<Bug pattern="NM_CLASS_NOT_EXCEPTION" />
103+
</Match>
104+
105+
</FindBugsFilter>

0 commit comments

Comments
 (0)