Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unused properties in IntelliJ

I am having a problem with IntelliJ inspection: It is indicating that all of my properties are unused (see the image). This is untrue, because all my properties all correctly used in spring boot project. I am using IntelliJ Community Edition 2016.1.4

unused properties image

like image 637
Kapitalny Avatar asked Aug 24 '16 06:08

Kapitalny


People also ask

Where can I find idea properties file?

Locate the idea. properties file in the bin directory in IntelliJ IDEA's installation directory. The default location is C:/Program Files/JetBrains/IntelliJ IDEA Community Edition 10.5. 1/bin.


Video Answer


2 Answers

If you want to ignore all warnings in a specific file. We just have to add this at the first line :

# suppress inspection "UnusedProperty" for whole file

If you just want to ignore a warning for a single property, you can add this line before the property :

# suppress inspection "UnusedProperty"

popup menu to suppress warning text to add to suppress warning for whole file

like image 95
Mattew Eon Avatar answered Oct 27 '22 22:10

Mattew Eon


Idea -> Preferences -> search "unused" or "Inspections" -> uncheck "Unused Property " under "Properties Files"

like image 8
Kane.Sun Avatar answered Oct 27 '22 23:10

Kane.Sun