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

Add new rule to SwiftLint for enforcing specific ACL on Error types #68

Open
svenmuennich opened this issue Sep 25, 2020 · 0 comments
Open
Labels
enhancement Issues that describe new features or improvements to existing features.

Comments

@svenmuennich
Copy link
Member

To be able log or display the correct type of an error, its ACL must be sufficiently open for the error handling to be able to see the type. Hence any Error types declared within the same module of the logging/displaying must have at least internal ACL, while any Error types declared in a module consumed by the logging/displaying module (i.e. a library) must have at least public ACL.

We should add a new rule to SwiftLint called minimum_error_acl for enforcing a minimum ACL for Error types. The rule should have a configuration option acl which can be set to any of Swift's ACLs, but defaults to public.

@svenmuennich svenmuennich added the enhancement Issues that describe new features or improvements to existing features. label Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues that describe new features or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

1 participant