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

unusedPrivateDeclarations Deleting private funcs in extensions #1944

Open
Megatron1000 opened this issue Dec 9, 2024 · 1 comment
Open

Comments

@Megatron1000
Copy link

Say you've got this

class MyClass {
   func doSomething() {
      doTheThing()
   }
}

extension MyClass {
   private func doTheThing() {
   }
}

doTheThing will be deleted for being unused. I guess it's just checking if it's used within the extension itself.

@calda
Copy link
Collaborator

calda commented Dec 9, 2024

When I test the unusedPrivateDeclarations rule with this sample code, the private func doTheThing() is not removed (the rule correctly notices that the doTheThing method is not unused).

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

2 participants