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 "Examples" .periphery.yml file with various case scenarios #827

Open
pouty18 opened this issue Oct 23, 2024 · 1 comment
Open

Add "Examples" .periphery.yml file with various case scenarios #827

pouty18 opened this issue Oct 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@pouty18
Copy link

pouty18 commented Oct 23, 2024

I'm loving the tool so far but trying to integrate it into a large production app has proved difficult. I would love if there was an examples directory where we could inspect various periphery yml files with expected outcomes.

For instance, I only want to use the tool to remove outdated files that are no longer referenced. However, I'd like to exclude any of the other issues from being reported...ie. functions, properties, parameters, enums, etc.

If there is a way where I can already see this being done that would be sweet.

@ileitch
Copy link
Contributor

ileitch commented Dec 18, 2024

For instance, I only want to use the tool to remove outdated files that are no longer referenced.

Periphery doesn't identify unused files but the things declared within them. If you want to identify unused classes, structs, and enums, then you should be able to filter the results with a simple grep or by using the JSON output format and parsing the kind field.

There's no configuration option to achieve this so periphery.yml examples wouldn't help here. Maybe a new option like --filter-top-level could exclude any declarations that are members of another, e.g., instance methods and properties.

@ileitch ileitch added the enhancement New feature or request label Dec 18, 2024
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