You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.
Sorry, still using FindBugs, but we have a ticket in our backlog to upgrade to SpotBugs, and as far as I understand, configuration is the same and I only need to update groupId, artifactId and version.
This generates a file target/findbugsXML.xml which contains BugInstances that look like this:
<BugCollectionsequence='0'release=''analysisTimestamp='1554129043559'version='3.0.1'timestamp='1554129041000'>
<BugInstanceinstanceOccurrenceNum='0'instanceHash='8dc725917956f30f9b8ab828a70d6420'rank='16'abbrev='Bx'category='PERFORMANCE'priority='1'type='DM_BOXED_PRIMITIVE_TOSTRING'instanceOccurrenceMax='0'>
<ShortMessage>Method allocates a boxed primitive just to call toString</ShortMessage>
<LongMessage>Primitive boxed just to call toString in com.itextpdf.barcodes.Barcode128.setCode(String)
</LongMessage>
<Classclassname='com.itextpdf.barcodes.Barcode128'primary='true'>
<SourceLineclassname='com.itextpdf.barcodes.Barcode128'start='67'end='900'sourcepath='com/itextpdf/barcodes/Barcode128.java'sourcefile='Barcode128.java'>
<Message>At Barcode128.java:[lines 67-900]</Message>
</SourceLine>
<Message>In class com.itextpdf.barcodes.Barcode128</Message>
</Class>
<MethodisStatic='false'classname='com.itextpdf.barcodes.Barcode128'signature='(Ljava/lang/String;)V'name='setCode'primary='true'>
<SourceLineendBytecode='579'classname='com.itextpdf.barcodes.Barcode128'start='682'end='718'sourcepath='com/itextpdf/barcodes/Barcode128.java'sourcefile='Barcode128.java'startBytecode='0'></SourceLine>
<Message>In method com.itextpdf.barcodes.Barcode128.setCode(String)</Message>
</Method>
<MethodisStatic='false'role='METHOD_CALLED'classname='java.lang.Integer'signature='()Ljava/lang/String;'name='toString'>
<SourceLineendBytecode='31'classname='java.lang.Integer'start='935'end='935'sourcepath='java/lang/Integer.java'sourcefile='Integer.java'startBytecode='0'></SourceLine>
<Message>Called method Integer.toString()</Message>
</Method>
<MethodisStatic='true'role='SHOULD_CALL'classname='java.lang.Integer'signature='(I)Ljava/lang/String;'name='toString'>
<Message>Should call Integer.toString(int) instead</Message>
</Method>
<SourceLineendBytecode='135'classname='com.itextpdf.barcodes.Barcode128'start='699'end='699'sourcepath='com/itextpdf/barcodes/Barcode128.java'sourcefile='Barcode128.java'startBytecode='135'primary='true'>
<Message>At Barcode128.java:[line 699]</Message>
</SourceLine>
</BugInstance>
...
</BugCollection>
I would like to use this report as a baseline, to prevent new Findbugs errors from creeping in, so I would like to convert this report to a excludeFilterFile.
run a build to generate target/findbugsXML.xml (already done)
run mvn findbugs:gui
load the findbugsXml.xml file
select the root node of the warnings (because I want all warnings)
save the exclusions to findbugs-filter.xml
When I do that, I get a findbugs-filter.xml file with the following content:
<FindBugsFilter></FindBugsFilter>
That's an empty filter file.
So what am I doing wrong here? What is the correct way to generate a filter file? I hope that I don't have to do it manually, because there are literally hundreds of warnings.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Sorry, still using FindBugs, but we have a ticket in our backlog to upgrade to SpotBugs, and as far as I understand, configuration is the same and I only need to update
groupId
,artifactId
andversion
.This is a piece from my
pom.xml
:I run the following command:
This generates a file
target/findbugsXML.xml
which containsBugInstances
that look like this:I would like to use this report as a baseline, to prevent new Findbugs errors from creeping in, so I would like to convert this report to a
excludeFilterFile
.For the snippet above, the syntax should become:
According to this Stack Overflow answer, what I should do, is:
target/findbugsXML.xml
(already done)mvn findbugs:gui
findbugsXml.xml
filefindbugs-filter.xml
When I do that, I get a
findbugs-filter.xml
file with the following content:That's an empty filter file.
So what am I doing wrong here? What is the correct way to generate a filter file? I hope that I don't have to do it manually, because there are literally hundreds of warnings.
The text was updated successfully, but these errors were encountered: