Is it possible to create new rules for Sonarlint?

And a thorough description of the problem / question:

My team has its own coding rules for C, now we want to add those rules to be put in the SonarLint.
I just want to ask if it is possible to create a new rules in Sonarlint? Are there other ways to achieve this? We mapped already mapped the rules in SonarLint for C, and some rules has it similarities.

Example:
Function name(Our Rule): {class name}_{operand/function}()

Similar rule in Sonarlint:
“Function names should comply with a naming convention(c:S100)”

Hey there.

Adding coding rules to C analysis isn’t supported in SonarLint.

With that being said, rules like S100 are configurable to use a RegEx that is compatible with your project (taking into account how you have decided to name functions, for example). Is that enough?

1 Like