Skip to content

CXX Unknown Rule

Günter Wirth edited this page Nov 14, 2024 · 7 revisions

Starting with cxx plugin version 2.2 all CXX repositories contain a rule with the key unknown. By activating this rule, unknown rules in the reports are not discarded but mapped to this rule. This helps to identify unknown rules, e.g. from newer versions of a tool.

Configuring your project

  • To display issues, the corresponding rules must first be enabled in the Quality Profile being used by the project. Manage Quality Profiles explains the details.
  • Activate the unknown rule in the repository for which you want to report unknown rules in SonarQube. The repositories are assigned to a sensor that is responsible for reading tool-specific reports (e.g. Cppcheck, Clang-Tidy, ...).

Troubleshooting

Understanding the scanner .LOG file

The listing below shows an example of the contents of a scanner .LOG file and describes the specific steps. In order to get all required information, the debug information should be switched on during scanning.

If no rule is active for a sensor, the LOG file contains the following entry:

If the unknown rule is not active, the mapping is switched off and the LOG file contains the following entry:

If the unknown rule is active, the mapping is switched on and the LOG file contains the following entry:

Clone this wiki locally