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

function_parameter_count rule should not apply to overridden methods / protocol implementations #1562

Closed
frenetisch-applaudierend opened this issue May 25, 2017 · 3 comments
Labels
enhancement Ideas for improvements of existing features and rules.

Comments

@frenetisch-applaudierend

When overriding a method, or implementing one from a protocol, I don't have any control over the number of parameters. Therefore I feel this rule should not report in those cases. Instead it should (and presumably does) report at the base class / protocol definition.

@marcelofabri marcelofabri added the enhancement Ideas for improvements of existing features and rules. label May 25, 2017
@marcelofabri
Copy link
Collaborator

Checking if it's an overridden method should be easy, but we can't check if a method is implemented from a protocol without major changes on how SwiftLint works (see #836 (comment)).

@marcelofabri
Copy link
Collaborator

Do you want to try making a PR to check if it's an overridden method? 💯

@frenetisch-applaudierend
Copy link
Author

Love to! I'll take a stab at it over the weekend 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules.
Projects
None yet
Development

No branches or pull requests

2 participants