I'm using Sonar to analyze my TS code in my Angular app.
I recently enabled the typescript:S107 (RSPEC-107) rule "Functions should not have too many parameters" but I have some false positive warnings because of Angular Dependency Injection.
Is there a solution to keep this rule for function parameters but ignore it for constructors ? Or even better, ignore it for constructors if the class has some annotations ? (for Angular, Injectable, Component, Pipe, Directive).
I'm using Sonar to analyze my TS code in my Angular app.
I recently enabled the typescript:S107 (RSPEC-107) rule "Functions should not have too many parameters" but I have some false positive warnings because of Angular Dependency Injection.
Is there a solution to keep this rule for function parameters but ignore it for constructors ? Or even better, ignore it for constructors if the class has some annotations ? (for Angular,
Injectable
,Component
,Pipe
,Directive
).SonarQube version: 8.0.0.29455
Rule key: typescript:S107
Reproducer
Current behavior
I get a warning because the constructor has more parameters than allowed by the rule.
Expected behavior
No warning because there're no other solutions to inject dependencies in this Angular component.