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

NonApiType: signaling for use of non-API-types on private methods does not make sense #4254

Open
cobratbq opened this issue Jan 18, 2024 · 0 comments

Comments

@cobratbq
Copy link

cobratbq commented Jan 18, 2024

NonApiType warns for concrete types used as parameter types and return types for (static) private methods. To verify this for private methods does not make sense, given that the class is the unit of abstraction. You cannot ignore the chosen concrete type if it is subsequently used as part of internal state.

Note that you can voluntarily choose to ignore the concrete type if its use is so minimal that the concrete type does not in any way reach an implementation boundary or design limitation. However, given that private methods can only be accessed in the internals of classes, the class itself needs to be sound unit and hiding types would obscure possible problems.

update or parameter-types of private constructors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant