Inspections
Inspections are built-in static code analysis tools that help you find probable bugs, detect performance issues, and improve the overall code structure.
Most inspections not only tell you where a problem is, but also provide quick fixes to deal with it right away. Press ⌥⏎ to choose a quick fix.
Inspections that are too complex to be run on-the-fly are available when you perform code analysis for the entire project. You can do this in one of the following two ways: by selecting Code | Inspect Code from the main menu, or by selecting Code | Run Inspection by Name to run an inspection by its name.
Note that while inspections provide quick-fixes for code that has potential problems, intentions help you apply automatic changes to code that is correct. To get a list of intentions applicable to the code at the caret, press⌥⏎.