Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
div
classnavigation
HTML Table
width100%
Table Row (tr)
Table Cell (td)
width33%
Align
alignleft
Previous
span
classsep
|
span
classtext
Find Usages
Table Cell (td)
width33%
Align
aligncenter
Top
span
classsep
|
span
classtext
Quick Start
Table Cell (td)
width33%
Align
alignright
Next
span
classsep
|
span
classtext
Code Style and Formatting

...

Wiki Markup
{div:class=navigation}
{table:width=100%}
{tr}
{td:width=33%}{align:left}[Previous|Find Usages] {span:class=sep}\| {span}{span:class=text}Find Usages{span}{align}{td}
{td:width=33%}{align:center}[Top|Quick Start] {span:class=sep}\| {span}{span:class=text}Quick Start{span}{align} {td}
{td:width=33%}{align:right}[Next|Code Style and Formatting] {span:class=sep}\| {span}{span:class=text}Code Style and Formatting{span}{align} {td}
{tr}
{table}
{div}

Wiki Markup
{redirect:https://www.jetbrains.com/idea/help/code-inspection.html

...

|delay

...

=0}

Info
iconfalse

Inspections are built-in static code analysis tools that help you find probable bugs, locate dead code, detect performance issues and improve the overall code structure.

...

Inspections that are too complex to be run on on-the-fly are available when you perform code analysis for the entire project via

span
classshortcut
Analyze
Inspect Code
span
classshortcut
Wiki Markup
{span:class=shortcut}Analyze{span}
Wiki Markup
{span:class=shortcut}Inspect Code{span}
menu, or when you run certain inspection by its name via
span
classshortcut
Analyze
Run Inspection by Name
span
classshortcut
Wiki Markup
{span:class=shortcut}Analyze{span}
Wiki Markup
{span:class=shortcut}Run Inspection by Name{span}
.

2. Navigate to the next/previous problem

The editor lets you quickly navigate between the highlighted problems via keyboard shortcuts. Press

F2
span
classshortcut
Wiki Markup
{span:class=shortcut}F2{span}
to go to the next problem and Shift+F2 to go to the previous one. You can configure the severity of the problems through which the F2
span
classshortcut
Wiki Markup
{span:class=shortcut}F2{span}
key navigates in the
span
classshortcut
Settings
Editor
span
classshortcut
Wiki Markup
{span:class=shortcut}Settings{span}
Wiki Markup
{span:class=shortcut}Editor{span}
and tell it, for example, to always jump to the most serious issue in a file.

...

To get complete report with the inspection results for an entire project, use the

span
classshortcut
Analyze
Inspect Code
span
classshortcut
Wiki Markup
{span:class=shortcut}Analyze{span}
Wiki Markup
{span:class=shortcut}Inspect Code{span}
command.

4. Quick-fixes

Most inspections not only tell you where a problem is, but provide quick-fixes to deal with them right away. Just press

span
classshortcut
Alt
+ Enter
span
classshortcut
Wiki Markup
{span:class=shortcut}Alt{span}
+
Wiki Markup
{span:class=shortcut}Enter{span}
and choose a quick-fix.

5. Suppress warnings

...

To run a single inspection by its name just press

span
classshortcut
Shift
+
span
classshortcut
Alt
+
span
classshortcut
Ctrl
+
span
classshortcut
I
(
span
classshortcut
Shift
+
span
classshortcut
Alt
+
span
classshortcut
Cmd
+ I
span
classshortcut
Wiki Markup
{span:class=shortcut}Shift{span}
+
Wiki Markup
{span:class=shortcut}Alt{span}
+
Wiki Markup
{span:class=shortcut}Ctrl{span}
+
Wiki Markup
{span:class=shortcut}I{span}
(
Wiki Markup
{span:class=shortcut}Shift{span}
+
Wiki Markup
{span:class=shortcut}Alt{span}
+
Wiki Markup
{span:class=shortcut}Cmd{span}
+
Wiki Markup
{span:class=shortcut}I{span}
for Mac) shortcut or use
span
classshortcut
Analyze
Run Inspection by Name
span
classshortcut
Wiki Markup
{span:class=shortcut}Analyze{span}
Wiki Markup
{span:class=shortcut}Run Inspection by Name{span}
.

7. Highlighting level and power save mode

...

And finally you can change the list of inspections enabled for a project by managing the inspection profiles via

span
classshortcut
Settings
Inspections
span
classshortcut
Wiki Markup
{span:class=shortcut}Settings{span}
Wiki Markup
{span:class=shortcut}Inspections{span}
. If you want to share your inspection profile with your team, enable the Share profile checkbox, and check the inspections project files into VCS.

div
classnavigation
HTML Table
width100%
Table Row (tr)
Table Cell (td)
width33%
Align
alignleft
Previous
span
classsep
|
span
classtext
Find Usages
Table Cell (td)
width33%
Align
aligncenter
Top
span
classsep
|
span
classtext
Quick Start
Table Cell (td)
width33%
Align
alignright
Next
span
classsep
|
span
classtext
Code Style and Formatting Wiki Markup
{div:class=navigation}
{table:width=100%}
{tr}
{td:width=33%}{align:left}[Previous|Find Usages] {span:class=sep}\| {span}{span:class=text}Find Usages{span}{align}{td}
{td:width=33%}{align:center}[Top|Quick Start] {span:class=sep}\| {span}{span:class=text}Quick Start{span}{align} {td}
{td:width=33%}{align:right}[Next|Code Style and Formatting] {span:class=sep}\| {span}{span:class=text}Code Style and Formatting{span}{align} {td}
{tr}
{table}
{div}