MO2k4 / CleanCode

ReSharper/Rider Plugin
MIT License
63 stars 9 forks source link

Ignore ILogger as a dependency when checking for SRP #214

Open Mayron opened 2 months ago

Mayron commented 2 months ago

Is it possible to ignore ILogger as a dependency when analysing the code for too many dependencies? I get a warning that the class might be breaking the single responsibility principle but logging is a good practice to have and I don't think it should count as doing too much. It's everywhere in the codebase.

I would prefer to always ignore it so the below constructor could be analysed as having only 3 dependencies instead of 4: image image

MO2k4 commented 2 months ago

Hey :)

i don't know how i should feel about this, since this would add a dependency to the plugin itself.

What could be possible would be some mechanism to exclude by namespace name, but this still does not feel right. In your example the IHttpContextAccessor is also something thats more a less 'static' and will be added to all of your handlers, right? So should this be excluded as well?

Could u just increase the configuration value for this?