How to add more rules in Ruby

I see that in sonar cloud there is only 48 rules for ruby

How can i get more rules

Hi,

If you’re looking for built-in rules, that’s all we currently offer.

If you know of tools outside SonarCloud that offer additional rules, you could import their results into your SonarCloud analysis using the Generic Issue format.

 
HTH,
Ann

Ok, But if i want to add external analysis tools, like linters (Rubo Cop) to sonar cloud to get more rules for scanning my code.

How to do it

Is there any update on this?

Are there any external analysis tool so i can integrate them with sonar coud

Hi,

The answer is the same for Rubo Cop:

 
HTH,
Ann

I want to use external analysis tool with Ruby in sonarcloud and I think to do that is by use external issue
How to do that
And what are the analysis tools that integrated with sonarcloud ruby

How to use sonar.externalIssuesReportPaths in UI and how to use it with ruby

Please help me

What are the specific steps to config sonarcloud ruby with Rubocop

Hi,

The specific steps are:

  • analyze with your external tool
  • convert the output to the Generic Issue format
  • import your Genric Issue report into your SonarCloud analysis

What are the steps to convert Rubocop to Generic Issues? No idea. Maybe you’ll find a converter. Maybe you’ll have to write one yourself.

 
Ann

Hi,

about Rubocop, should i run a scan using rubocop and then put the path of the rubocop report in sonar.ruby.rubocop.reportPaths ??

Do i have to scan the code by rubocop manually everytime i want sonar cloud to use rubocop

Could you show me how to use sonar.externalIssuesReportPaths exactly

Could you give me a full example on using Generic Issue Data from sonar.externalIssuesReportPaths to the end

How to use this with Ruby rubocop

Hi,

My apologies! I wasn’t aware that Rubocop was natively supported.

You can use an analysis parameter (sonar.ruby.rubocop.reportPaths=[path to report file]) or fill in the path via the UI.

 
HTH,
Ann

Could you help me on this

Could you help me in this

Could you show me how to use sonar.externalIssuesReportPaths exactly

Could you give me a full example on using Generic Issue Data from sonar.externalIssuesReportPaths to the end

How to use this with Ruby rubocop

Hi,

As I stated above, it looks like you can import your Rubocop report natively:

 
Ann