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

Allow excluding xib files from index #373

Closed
monchote opened this issue Jul 15, 2021 · 3 comments
Closed

Allow excluding xib files from index #373

monchote opened this issue Jul 15, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@monchote
Copy link

Right now index-exclude only works for swift files but there are instances excluding xib files too can help Periphery detect more unused code as described here.

I'm working on a project where every UIView or UIViewController has an associated xib file. For example: as the UIView subclass declared in MyView.swift is referenced by MyView.xib, Periphery doesn't mark MyView as unused, even though it never gets instantiated anywhere else in the codebase.

I've tried --index-exclude "*.xib" but it didn't help.

@ileitch
Copy link
Contributor

ileitch commented Jul 23, 2021

This is now supported in 2.8.0, you can simply do --index-exclude "**/*.{xib,storyboard}".

@monchote
Copy link
Author

Thanks! I've just tried it and it works exactly as expected 🙏 🙏 🙏

@ileitch
Copy link
Contributor

ileitch commented Jul 24, 2021

Whoop, thanks for the sponsor 😊

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

No branches or pull requests

2 participants