Code Quality quality of a configuration is supported by multiple tools: IntelliJ IDEA, Gitlab and SonarQube. All of these tools are internally using CodeNarc which is a standard tool for static analysis for groovy Groovy language. The CodeNarc provides more than 400 rules that can be used for quality check. We went through all of those and checked which we would like to have enabled or disabled and came up with standard reviewed each rule and determined which ones should be enabled or disabled. As a result, we formulated a standardized ruleset for each of the tools.
Drawio | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
IntelliJ IDEA
This IntelliJ IDEA is used by configuration engineers Configuration Engineers during development. How to CodeNarc setup CodeNarc and usage in Studio and how to use it is described in a separate article are described at Code Quality in IDEA.
Pfxprobe
We developed a tool called “pfxprobe” which can designed to be run executed as a Gitlab (or other) pipeline to check , facilitating the quality evaluation of the merge requests. We use pfxprobe internally on our projects, mainly for the solution architects can to have an overview of code quality delivered. Of course, configuration team may find thse useful as wellrequest quality. Internally, we employ pfxprobe in our projects, primarily enabling Solution Architects to gain insights into the delivered code quality. Naturally, the configuration team may also find this tool beneficial.
Setup for a project is easy: simply generate pom.xml and .gitlab-ci.yml files in Studio project by right-click on clicking the root folder in Studio > Pricefx > Create pom.xml and .gitlab-ci.yml and commit these files to the repo.
The tool is available as docker image pricefx/pfxprobe on at the Docker Hub which and can be used to setup on customer instance of Gitlab for a setup at a customer’s Gitlab instance (or other CI/CD service). You can check the Gitlab pipeline configuration in the ‘pfxprobe’ section of our standard .gitlab-ci.yml file.
...
To provide an overview of the project's code quality of our projects for solution architects, configuration engineers as well as for for Solution Architects, Configuration Engineers and management, we are using use SonarQube internally. It is executed as gitlab Gitlab pipeline and the setup is the same as for the pfxprobe:.
Simply generate Generate pom.xml and .gitlab-ci.yml files in Studio project by right-click on clicking the root folder in Studio > Pricefx > Create pom.xml and .gitlab-ci.yml and commit these files to the repo.
If the customer or partner is running run their own SonarQube instance, the standard ruleset for pricefx Pricefx configurations can be downloaded from here: https://developer.pricefx.eu/studio/codenarc/Sonar_Pricefx_Configuration.xml
...