Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port FxCop rule CA1506: AvoidExcessiveClassCoupling #437

Closed
ghost opened this issue Nov 21, 2015 · 1 comment
Closed

Port FxCop rule CA1506: AvoidExcessiveClassCoupling #437

ghost opened this issue Nov 21, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 21, 2015

Title: Avoid excessive class coupling

Description:

This rule measures class coupling by counting the number of unique type references that a type or method contains.

Dependency: MetricsPackage

Notes:

VS is the better place to experience this. You don't want to add one more class-valued field to a class, "fall off the cliff", and have your RI blocked.

@mavasani
Copy link
Contributor

@mavasani mavasani reopened this Jul 19, 2018
@mavasani mavasani self-assigned this Jul 19, 2018
@mavasani mavasani added this to the 15.9 milestone Jul 19, 2018
mavasani added a commit to mavasani/roslyn-analyzers that referenced this issue Jul 19, 2018
1. [CA1501](https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1501-avoid-excessive-inheritance): Avoid excessive inheritance
2. [CA1502](https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1502-avoid-excessive-complexity): Avoid excessive complexity
3. [CA1505](https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1505-avoid-unmaintainable-code): Avoid unmaintainable code
4. [CA1506](https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1506-avoid-excessive-class-coupling): Avoid excessive class coupling

Fixes dotnet#433
Fixes dotnet#434
Fixes dotnet#436
Fixes dotnet#437

Future work items (I will file issues for these soon):
1. Refactor the core code metrics computation into a separate library.
2 A command line tool, such as Metrics.exe, that uses the above library and dumps out the metrics tree onto console or a log file (Metrics.exe shipped prior to VS2017).
3. Share code with VS implementation of Code Metrics - currently we have a clone of the code that computes the metrics. Once we start inserting packages from this repo to VS repo, we can delete the clone and reference that package (which will need to happen when we move CodeStyle rules to NuGet packages).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant