Skip to main content

FindBugs - how to find the correct exclude filter

findbugs is important java tool for static code analysis. There is also maven findbug plugin.

The tool write XML report file. Sometimes, there is a need to exclude from the report some detected bug. findbugs can use filter files to include or exclude bugs. The maven plugin can use this files using exclude property.

There is simple way to generate that file:




  • Run the findbugs to create the report with the bugs to be excluded (mvn findbugs:findbugs)
  • Run the findbugs GUI (mvn findbugs:gui
  • Open the report file 
  • Find the bug to exclude
  • Right click on bug and choose 'Filter bugs like this'
  • Select the categories in the opened dialog
  • Export the filter using File->Export filter
  • Read the exported file
Screenshots:

Open file:


 Find the bug and filter it


Export the filter file


 Check the file:

Comments

Popular posts from this blog

SSL in pictures

Here is my summary on SSL (or as I like to call it 'SSL for dummies')

Best freeware - XML editor

As a software developer, I open XML files all the time. I a heavy commercial XML editor. But nothing can compare to a small, thin and free XML editor like 'foxe'. A great feature is has is the alignment of long XML strings to readable XML format (Shift-F8). It help lot of times when the XML file was generated by some tool and was not readable. Homepage: http://www.firstobject.com/dn_editor.htm

What is dynamic programming (hebrew)?

תכנון דינמי, תכנות דינמי או באנגלית Dynamic Programming הם שמות לדרך ליצירת אלגוריתמים. המילה "תכנות" בשם כוונות יצירת תוכנית פעולה ולא קידוד בשפת תכנות. הבסיס של השיטה שני הרעיונות שעומדים מאחורי השם המרשים הם: 1.      האלגוריתם יפתור את הבעייה בצורה רקורסיבית ע"י חלוקתה לתתי בעיות שגם הן נפתרות ע"י חלוקתן לתתי בעיות וכו עד שמגיעים לבעיה פשוטה. זה בעצם סוג של רקורסיה עם כמה תוספות. 2.      החזקה בצד את כל התוצאות שכבר נמצאו לתתי בעיות כך שאם נגיע שוב לאותה תת בעייה, לא נחשב אותה שוב. יותר קל להבין את הרעיון הזה ע"י שתי דוגמאות. דוגמא אחת היא בעיית "תרמיל הגב" ובעייה שנייה היא חישוב מספר פיבונצ'י. בעיית "תרמיל הגב"   בעיית "תרמיל הגב" או  Knapsack problem היא בעייה כללית שיש לה שימושים שונים.  דוגמא לבעיה הזו: גנב נכנס למחסן. יש לו תרמיל שיכול לסחוב עד 7 ק"ג. במחסן יש 30 מוצרים. כל מוצר שוקל משקל מסויים ויש לו ערך כספי מסויים. הגנב צריך דרך (אלגוריתם) לדעת איזה מוצגים לקחת כך שיהיה להם...