realvizu / NsDepCop

NsDepCop is a static code analysis tool that helps to enforce namespace dependency rules in C# projects. No more unplanned or unnoticed dependencies in your system.
GNU General Public License v2.0
200 stars 32 forks source link

Dependency config effectiveness metric #6

Open realvizu opened 7 years ago

realvizu commented 7 years ago

Calculate a metric that shows the effectiveness of the current dependency config.

DepConfigEffectiveness = (# of actual type-level dependencies in code) / (# of all allowed type-level dependencies)

The extreme cases would be:

Performance concern: calculating the # of all allowed type-level dependencies would require counting all types in all namespaces in all referenced assemblies which sounds extreme.