3 more MISRA C++2023 rules, Wind River ccarm compiler support and reporting of issues inside macros

Hello dear C++ users

First, you can now use three more MISRA C++2023 rules:

  • Rule M23_235: Variables should be captured explicitly in a lambda that is not transient
  • Rule M23_394: Lambdas shall not implicitly capture “this”
  • Rule M23_328: Reads and writes on the same file stream shall be separated by a positioning operation

All available MISRA C++ 2023 rules can be found here .

Second, we added support for Wind River’s ccarm compiler.

Finally, with issues with execution flows, you can:

  • see issues with their primary location inside a macro expansion. This allows reporting 8% more of such issues on average.
  • see secondary locations located in macro expansions making the execution flow much easier to follow.

These new features will be available with SonarQube 10.4 starting from Developer Edition. They will be available shortly on SonarCloud and in SonarLint.

As always, you can see what’s coming next and vote for C and C++ features you would like to see in SonarQube , SonarCloud , and SonarLint .

Cheers

1 Like

The page for M23_328 doesn’t have a link to a corresponding rule for non-mission-critical contexts. Are all of the MISRA specific rules supposed to have alternatives in the generic C++ rule section?

No, they are not. Some rules only make sense for embedded software, for instance.

In the case of M23_328, though, it does make sense for generic software.

We are still in the process of defining how to articulate MISRA rules with generic clean code rules in our products. For now, nothing prevents you from enabling this rule if you think it has value, even if you’re not working in a MISRA context.

1 Like