JavaRush /Java Blog /Random EN /IntelliJ IDEA User Guide. Checks.
theGrass
Level 24
Саратов

IntelliJ IDEA User Guide. Checks.

Published in the Random EN group
Checks
Проверки (инспекции) это встроенные средства для статического анализа codeа, которые помогают вам найти возможные баги, определить неиспользуемый code, обнаружить причины падения производительности и улучшить общую структуру codeа.
  1. On-the-fly code analysis Most checks are done on-the-fly, and the editor shows errors and warnings as you type the code. IntelliJ IDEA User Guide.  Checks.  - 1
      Those checks that are too complex to perform on the fly are available when you conduct code analysis for the entire project. It can be run from the Analyze → Inspect Code menu , and individual checks can be run from the Analyze → Run Inspection by Name menu.
      • Move to next/previous issue The editor allows you to quickly move between highlighted issues in your code using keyboard shortcuts. Press F2 to go to the next problem, and Shift+F2 to go to the previous one. In the settings (Settings → Editor) you can specify in what order you will move from problem to problem by pressing F2 , for example, you can configure it so that each time the transition is made to the most serious of the yet unresolved problems in the current file.
        • Inspecting the entire project To get a complete report on the problems of the entire project, you can run a code analysis from the menu Analyze → Inspect Code (Analysis → Code Inspection) IntelliJ IDEA User Guide.  Checks.  - 2
          • Quick Fixes Most checks not only tell you exactly what the problem is, but also give you options for solving it. Just press Alt + Enter and choose the option that suits you. IntelliJ IDEA User Guide.  Checks.  - 3
            • Disabling Warnings If you do not need warnings about possible problems with a given method or statement, you can disable them. To do this, bring up the quick fixes menu, and in it, press the right arrow. In the menu that appears, you can select the option that best suits you to disable this warning. Sometimes this may be a better solution than disabling verification for the entire project. IntelliJ IDEA User Guide.  Checks.  - 4
              • Running an Individual Inspection To run an individual inspection, press Shift + Alt + Ctrl + I (Shift + Alt + Cmd + I for Mac) or select the Analyze → Run Inspection by Name menu item. IntelliJ IDEA User Guide.  Checks.  - 5
                • Error display levels and power saving mode Also very useful is the Hektor icon on the status panel. It helps you switch the levels of error display - from completely disabling all errors to showing all syntax and all checks. At the syntax error level, you won't see any warnings while your code is compiling. IntelliJ IDEA User Guide.  Checks.  - 6
                    The Hector icon also allows you to enable power-saving mode, which helps save battery power on your laptop by disabling error displays and automatic pop-ups.
                    • Inspection Profiles Finally, you can change the list of inspections that run using inspection profiles in the Settings → Inspections menu . If you want to share your profile with your team, check the Share box in the settings and add the profile file to your project's version control system. IntelliJ IDEA User Guide.  Checks.  - 7
                      Original article
                      Comments
                      TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
                      GO TO FULL VERSION