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.
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:
1 -> means the tightest dependency config that allows only the actually used dependencies.
Close to 0 -> means a very loose dependency config that allows everything so does not have much effect.
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.
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.