MISRA Compliance for SonarQube - Early Access

Hello dear C and C++ users,

We are thrilled to announce that we are finally back to MISRA.

Not only are we aiming for full coverage for MISRA C++:2023, we also want to provide support for MISRA compliance. You can read more about this here.

General Availability of MISRA compliance for SonarQube will be announced later.

In the meantime, we are progressing full-steam ahead and making all the MISRA related features available in Early Access in SonarQube Server Enterprise Edition (EE) and Data Center Edition (DCE). The Early Access is available as an opt-in.

The first batch of MISRA Compliance for SonarQube Early Access is coming with SonarQube Server 2025.2 in EE and DCE.

It brings 26 new MISRA C++:2023 rules:

  • Rule M23_220 (21.2.1): The library functions ‘atof’, ‘atoi’, ‘atol’ and ‘atoll’ from ‘’ shall not be used
  • Rule M23_165 (13.1.2): An accessible base class shall not be both virtual and non-virtual in the same hierarchy
  • Rule M23_091 (8.2.4): Casts shall not be performed between a pointer to function and any other type
  • Rule M23_093 (8.2.6): An object with integral, enumerated, or pointer to ‘void’ type shall not be cast to a pointer type
  • Rule M23_223 (21.2.2): The ‘string handling functions’ from ‘’, ‘’, ‘’ and ‘’ shall not be used
  • Rule M23_368 (21.2.3): The library function ‘system’ from ‘’ shall not be used
  • Rule M23_259 (21.6.2): Dynamic memory shall be managed automatically
  • Rule M23_358 (21.6.4): If a project defines either a sized or unsized version of a global ‘operator delete’, then both shall be defined
  • Rule M23_148 (21.10.1): The features of ‘’ shall not be used
  • Rule M23_159 (12.2.1): Bit-fields should not be declared
  • Rule M23_160 (12.2.2): A bit-field shall have an appropriate type
  • Rule M23_343 (13.3.1): ‘User-declared’ member functions shall use the ‘virtual’, ‘override’ and ‘final’ specifiers appropriately
  • Rule M23_147 (13.3.2): Parameters in an overriding virtual function shall not specify different default arguments
  • Rule M23_149 (13.3.3): The parameters in all ‘declarations’ or overrides of a function shall either be unnamed or have identical names
  • Rule M23_342 (6.4.2): Derived classes shall not ‘conceal’ functions that are inherited from their bases
  • Rule M23_143 (6.8.3): An assignment operator shall not assign the address of an object with automatic storage duration to an object with a greater lifetime
  • Rule M23_363 (6.8.4): Member functions returning references to their object should be ‘ref-qualified’ appropriately
  • Rule M23_057 (6.9.1): The same type aliases shall be used in all ‘declarations’ of the same ‘entity’
  • Rule M23_048 (6.0.1): Block scope ‘declarations’ shall not be ‘visually ambiguous’
  • Rule M23_049 (6.0.2): When an array with external linkage is declared, its size should be explicitly specified
  • Rule M23_133 (6.0.3): The only ‘declarations’ in the global namespace should be ‘main’, namespace declarations and ‘extern ‘C’’ declarations
  • Rule M23_047 (6.2.4): A ‘header file’ shall not contain definitions of functions or objects that are non-inline and have external linkage
  • Rule M23_054 (6.5.1): A function or object with external linkage should be ‘introduced’ in a ‘header file’
  • Rule M23_055 (6.5.2): Internal linkage should be specified appropriately
  • Rule M23_142 (6.8.2): A function must not return a reference or a pointer to a local variable with automatic storage duration
  • Rule M23_023 (5.0.1): ‘Trigraph-like sequences’ should not be used

Together with the MISRA C++:2023 rules already available in SonarQube, it brings the total to 84 MISRA C++:2023 rules.

This is not beta software, this is production-grade. We look forward to your feedback on our MISRA Compliance feature as we build it.

Brace yourself, more is coming in upcoming Sonarqube Server releases.

7 Likes