typescript:S107 and NestJS

Greetings,
In NestJS we use DI. So it’s normal for a service to have more than 7 constructor args. This is a major, brain-overload, code-smell for Sonar, but it’s perfectly normal for a NestJS service to inject many services that are maintained by the custom class loader of Nest (which won’t complain about brain overload regarding an injectable service).
Maybe this rule should be a bit more loosy, on standard Sonar Way profile?

Hey there.

You’ve neglected to include some important information from the topic template!

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
1 Like