Filter rules on file extension


(Jowin De Bondt) #1

What I’m missing in SonarQube is the ability to en/disable rules based on file extension.

An example:
We have the rule ‘Functions should not have too many lines of code’ set to 200 lines for our Angular project.
We would like to reduce the amount of lines to 150, but then we would get a lot of issues on our *.spec.ts files.
This is because of the main describe() function.

Is it possible to add this feature?

(G Ann Campbell) #2


I think what you want is multi-criteria issue exclusion:


(Jowin De Bondt) #3

Yes, that is exactly wat I was looking for.