Custom RuleId Generic Issue Import Format

I have some automated tools to scan source code and send the result to sonarqube. I have confuse how to make custom Ruleid on Generic Issue Import Format in order to make the “Why is this an issue?” more understandable.
Is there any reference or documentation about it?

Hey there.

I’m not quite sure what you’re asking – are you referring to how to configure the Rule ID (setting ruleId in the issue report), or the rule description for those Rule IDs (take a look at Ann’s post below)

It’s indeed same question, but I dont see it solve my problem? can I make a custom ruleId based on this reference: Generic Issue Import Format | SonarQube Docs ?

is there any reference on how to write that ruleId, for example: \n to make string (new line) and so on???

The ruleId is just a technical ID (my-rule-key), nothing more. You cannot pass a full rule description in the generic issue format – you must create a plugin that references those technical IDs and provides those descriptions, as Ann referenced in her post.

Got it, is there any another reference on how to make sonarqube plugins, especially using external tools like brakeman, gosec(already has a plugin), bandit(python scanner)

Hi,

Your best bet is to take a look at open source plugins that do something similar to what you want to accomplish.

 
HTH,
Ann

We’re facing the same problem with SonarCloud, which cannot install any open source plugins.
Is there any way to provide the descriptions of the generic issues for SonarCloud users?

Hi @kota65535,

As you say, SonarCloud doesn’t run 3rd-party plugins, so this really is a separate topic.

 
Ann