简体   繁体   中英

Can IntelliJ IDEA show list of all violations of Nullable annotation

Is there option in IntelliJ IDEA to show list of all java source files where variable or return value of method annotated with @Nullable is used in a code?

For example, if I want to improve and update all source files with such violations I would like to see list all files (otherwise I have to open each single source and visually inspect highlighted areas)

Yes, you should be able to find probable problems/bugs by running a single inspection, via

Analyze > Run inspection by name

You might then customize the inspection settings for the single execution.

在此处输入图片说明

Those are the inspections you're looking for, most probably.

在此处输入图片说明

Running the inspection "Constant conditions & exceptions returns

图片

Btw, I'm an inspections maniac for these kind of things, glad to see others do so ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM