-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Document how Periphery treats references to storyboards/xibs #663
Comments
@ileitch any input here? 🙇 |
You are correct, this is the current behavior.
It is a deliberate choice that Periphery should never produce false-positive results. Because we have not yet implemented full xib parsing, Periphery retains all members on the type to avoid false positives. I'm closing this as a duplicate of #212, as my intention is for connections in xibs to only retain the members they reference. |
Hi! 👋
I've been using Periphery for a while in multiple projects, and recently there has been concern about whether Periphery takes storyboards/xibs (Interface Builder files in general) into account when considering whether properties/functions/classes are being used or not.
I couldn't find this information clear anywhere in the README nor in Issues of this repo, so I decided to test on my own to confirm (even though I kinda know that it worked based on past experience), and indeed I confirmed that it treats IB files safely, as such:
So I'd like to invite @ileitch (or any other major contributor who has enough knowledge about the inner workings of the tool) to officially document how Periphery handles those references and make it official for future readers, as this could be a deal breaker for adoption! And perhaps, while at it, clarify why Periphery chooses to take the "safe way" instead of the "clever way" when dealing with IB files? That is: if an IB references a class, and that class has a truly unused IBAction (for instance), why it doesn't mark that function as unused? It's not being referenced anywhere. Is this a technical limitation (i.e. we can't do anything about it), or a shortcut that was taken in the past?
Looking forward to hearing from core maintainers of this tool, as I'm curious to learn more about it! 😊
Thanks for this amazing tool! ❤️
The text was updated successfully, but these errors were encountered: