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

Type that implements an interface should not contain additional 'public' members #504

Open
RalfKoban opened this issue Sep 25, 2022 · 0 comments

Comments

@RalfKoban
Copy link
Owner

In case a type implements an single interface - and that interface provides multiple members - we should issue a warning if the type contains other non-overridden members.

The reason behind is following:
The type seems to be the default implementation of that interface.
In case the interface contained some members in previous versions - which have been removed in the current version - the type might not have been updated to reflect these changes. So it still might contain now unused members.

Note:
That rule does not enforce API design guidelines.
The guideline would have been that the interface should be kept unmodified after it has been released.
So the situation that the type contains additional members from previous versions of the interface should not occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Unclear
MiKo Analyzers
  
Unclear
Development

No branches or pull requests

1 participant