Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The profile is copied to IDEA and assigned to the project during the action Add Framework Support: right-click the root folder > Add Framework Support > check Pricefx > click OK.

Note

If you don’t do not have the “Add Framework Support” option in the menu, remove the “Pricefx API” library first: Right right-click on the root folder >  Open Open Module Settings > Libraries > Pricefx API (last in the list) > click [-] button above to remove this library > OK.

You should be able to see the inspection profile “Pricefx Configuration” in : Preferences > Inspections > Profile.

Repeat this step for every Pricefx project you work withat.

Info

In case the If you would need to manually install the profile manually, download it as XML file from https://developer.pricefx.eu/studio/codenarc/Pricefx_Configuration.xml and import it using “Import Profile” Import Profile from the popup menu under the gear icon in Preferences > Inspections > Profile.

For more details see https://www.jetbrains.com/help/idea/customizing-profiles.html.

How To Use

Once the CodeNarc plugin is installed and the inspection profile is added to the your project, you can start checking the inspections IDEA is displaying.

Current File

...

in Editor

The IDE continuously checks your code and searches for problems. The widget in the top-right corner of the editor displays the number of problems of each severity detected in the current file:

...

Click the widget to open the list of problems on the Current File tab of the Problems tool window. You can also access the Problems tool window by selecting View > Tool Windows > Problems or by pressing CTRL+6 (Windows) or ⌘+6 (Mac).

The color stripe in the scrollbar also marks the detected code problems and helps you quickly access the corresponding lines without scrolling the file. Hover over a mark on the stripe to see the detected problem in a tooltip. Click a mark to jump to the corresponding line.

For details see https://www.jetbrains.com/help/idea/file-and-project-analysis.html.

Current File

...

in Problems Tool Window

When the design-time code inspection is enabled, this tab lists all code issues found in the current file. The list is updated as you switch between files in the editor.

...

To see more detailed information about the rule, right click on any problem > Inspection xxx options > Show Quick-Fixes > Edit inspection profile setting.

Info

Hint: Lot of the Many problems can be solved by auto-formatting the code: Code > Reformat Code or by pressing Ctrl Ctrl+Alt+L (Windows) or ⌥ ⌘ L (Mac).

For details see https://www.jetbrains.com/help/idea/problems-tool-window.html#current-file.

Analyze the Whole Project

To get a list of all problems across a project, navigate to Code > Inspect Code > Analyze. The tool window Problems will open and you will get the a report with the problems, their count and occurrences:

...

See also: