Idea uses spotbugs to find bugs in your code

Time:2021-11-27

SpotBugs  He is the successor of findbugs and uses static analysis to find bugs in Java code.

Next, we mainly introduce the installation and use of spotbugs in idea

install

Idea –   Preferences – plugins, search for spotbugs in the plug-in market and click Install

After the installation, you need to restart idea to make it take effect.

The last step is to activate

The last step is to pass the inspectionFind Security Bugs  To activate security rules (already built-in).

Recommended configuration

  • For most users, the recommended minimum confidence is medium. For security enthusiasts looking for interesting details and information discovery, you can set the minimum confidence to low.
  • During security code review, you can hide non security related categories.
  • Analysis effect is set to maximum

Scan your code

Right click in the project:SpotBugs > Analyze Project Files

This is the end of this article about using spotbugs to find bugs in your code. For more information about bugs in idea code, please search previous articles of developeppaer or continue to browse the relevant articles below. I hope you will support developeppaer in the future!