sramzan
sramzan

Reputation: 96

How to define custom JavaScript Complexity Rules in SonarQube?

I have read through the complexity documentation via SonarQube Metrics Definition. I have also dug through the Rules we have defined, but those only determine bugs in the code & their respective severity. Unfortunately it does not outline how we could go about defining custom complexity rules (i.e. if you do x, the complexity will be increased by 1).

Could anyone shed some light on this?

Upvotes: 0

Views: 466

Answers (2)

Per Quested Aronsson
Per Quested Aronsson

Reputation: 12140

On https://docs.sonarqube.org/display/PLUG/Custom+Rules+for+SonarJS, it says

Custom rules

This feature is deprecated

As a replacement, we suggest you to have a look at ESLint, it provides custom rules that you can then import thanks to the External Issues feature.

Upvotes: 0

G. Ann - SonarSource Team
G. Ann - SonarSource Team

Reputation: 22824

Your question didn't originally specify language, so for

These are brief tutorials to bootstrap rule writing. In writing your own rules, you'll likely have questions of the "How do I get to X?" nature. With those, you should open a new thread on the SonarQube Google Group.

Upvotes: 2

Related Questions