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

Show a warning when a path in the "knip.json" file does not match any results #331

Closed
Zamiell opened this issue Nov 3, 2023 · 3 comments
Labels
feature request Feature request

Comments

@Zamiell
Copy link
Contributor

Zamiell commented Nov 3, 2023

For example, if the entry point was foo.ts, and the user typoed it to be fooo.ts, then Knip should immediately show a warning. Failing fast is important, as it potentially save the end-user a bunch of troubleshooting time.

@Zamiell Zamiell added the feature request Feature request label Nov 3, 2023
@webpro
Copy link
Collaborator

webpro commented Nov 3, 2023

The entry file options are patterns/globs, might contain wildcards, and try to find matching items on the file system. They're not meant to throw exceptions, just an array of matching files on disc.

What Knip could do however, is print a warning if there are exactly zero matches.

@Zamiell
Copy link
Contributor Author

Zamiell commented Nov 3, 2023

What Knip could do however, is print a warning if there are exactly zero matches.

Sure!

@webpro
Copy link
Collaborator

webpro commented Mar 24, 2024

Closing this, as there are too many factors at play to reliably implement this.

Thinking about a knip init or something to help with this, though.

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

No branches or pull requests

2 participants