Inspection report
Qodana lets you review inspection reports in an interactive and user-friendly form either locally or in Qodana Cloud.
Each report contains the following tabs:
Actual problems exposes the problems that Qodana detected during the latest inspection
Baseline lists the problems that were marked as baseline and were not fixed since then
Configuration lets you configure Qodana for future use
License audit reveals the license audit results and shows the dependency licenses that are incompatible with the project license
The upper-right corner of the report shows code coverage inspection results.
Actual problems
Using this tab, you can see the problems found as a result of the latest inspection.
This tab consists of several elements:
The sunburst diagram provides a graphical overview of the problems and allows you to drill down into the cause of the issue.
The group of filters lets you filter the report data using various criteria.
You can navigate between the list of problems and files, as well as search and group problems.
The Move selected to baseline button saves the selected problems to the Baseline list.
Clicking a problem in the list expands the underlying code fragment containing the detailed description.
If you have JetBrains Toolbox and JetBrains IDEs installed, you can edit the file containing the problem using your IDE. To do it, select your IDE from the dropdown list, and click the Open file in... button.
If you have several versions of the same IDE, you can select which version will be used to open the file. In the JetBrains Toolbox UI, drag or move the required version of the IDE to the top of the list using the Ctrl + Shift + ↑/↓ shortcut on Windows or Linux, or ⌘ + ⇧ + ↑/↓ on macOS.
The More actions list provides other options for handling problems, see the Adjust the analysis scope section.
You can copy the link to the problem and then navigate to it in Qodana Cloud.
Baseline
When you click the Move selected to baseline button on the Actual problems tab, the selected problems move to this tab.
This tab is similar to the Actual problems tab. To enable the baseline feature for future inspections, follow the instructions that appear in the report UI. For more information, explore the Baseline section.
Configuration
The Configuration tab lists the inspections and lets you adjust your inspection profile by specifying a set of inspections that Qodana will be using the next run.
Here, you can learn what each inspection does, as well as enable or disable it. To use this configuration for future use, you can download the qodana.yaml
file and save it into your project root directory.
See the Adjust your inspection profile section to learn the best practices.
License audit
The license audit feature.
tab provides results of inspection by theLicense audit inspection results are grouped into a dependency tree.
If applicable, you can expand a specific dependency to see its dependency tree.
Using
, you can switch between all project dependencies and dependencies which licenses are incompatible with the project license.In the
section, you can find the list of project, module and dependency licenses. Using , you can view the rules of license compatibility.You can download the list of licenses in various formats.
Adjust your inspection profile
We believe that the ability to see what was checked is as important as the list of problems found. For example, if you haven't checked for typos, you can be happy to see zero typos in your project. There may be many of them – you just don't check.
If the number of problems is manageable, you can fix them and consider the 'problem-free code' goal achieved. We suggest that you follow that goal and fix new problems as soon as they appear.
In case the number of problems is above your expectations, we suggest using the Qodana features to examine them.
When you have no possibility to fix old problems and want to prevent the appearance of new ones, you can run Qodana in the baseline mode.
Adjust the analysis scope
Reduce the scope of analyzed issues
When viewing a code fragment with a detected problem, you may decide that it is irrelevant. You can make sure that more problems of the same type are omitted in the future. For this purpose, you can edit qodana.yaml or use the Actual problems tab as shown below.
Exclude a file or directory from the future analysis
Reason: The analysis of the file containing the error, or even the directory containing this file, doesn't make sense in your project. For example, it's actually not the source code but some generated or downloaded content.
Howto: Under the code fragment view, click More actions and select the necessary option.
OR:
Above the code fragment view, click the file path to navigate to the File explorer.
On the File explorer, click the icon to the left of the filename, and then select Mark as Excluded.
Hide a problem type or category from the list of problems
Reason: You suppose that the error type or its category is not relevant or want to get back to it later.
Howto: Under the code fragment view, click More actions and select the necessary option.
Enable excluded or hidden problems
To reverse the exclusions you made, download qodana.yaml
in the Profile configuration section, edit it as necessary, put it in the project root directory, and then run Qodana again with this new configuration.
To learn how to configure Qodana using qodana.yaml
, see the Configure profile section.