Support for custom rule creation for C/C++

I’d like to request adding support for creating custom CFamily rules. According to this page, only importation of external reports is supported for CFamily.

My team’s specific use case is to flag/disallow certain features of the language that break backwards compatibility. We are currently solving this by first running a different linter that does support custom rules, however this adds complexity and confusion for maintainers.

We would much prefer a way to keep everything directly within SonarQube, and even better if things like simple regex-based rules could be configured directly in the web UI.

Hello @mtmaliske,

We don’t currently plan to offer custom rules inside of our CFamily analysis. It would be extremely difficult for us to support compatibility of those rule across versions.

However, if the rules you have in mind are regex-based, it should not be too complex to generate a file in the right format from running those regexes, and then use the external report feature to import those rules in our analyzer.

Additionally, if you have rule ideas that you think could be useful for everybody, you can share them with us, and there is a chance they could be added.