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

fix(cli): emits error if no target files are found #9527

Merged
merged 7 commits into from
Feb 19, 2021

Conversation

magurotuna
Copy link
Member

@magurotuna magurotuna commented Feb 17, 2021

This PR makes fmt and lint emit "No target files found." error if no target files are found. (This happens if the passed path is URL, for example.)
Fixes #9518

@caspervonb
Copy link
Contributor

caspervonb commented Feb 18, 2021

Hmmm I don't think we should change the behaviour of collect_files but instead if should be up to the individual commands?

The test command for example has an option to allow no test files to be run (deno test --allow-none) and I am making use of collect_files in my experimental test-runner.

I think the call site tools::lint::lint_files would be a good place to error out for example.

@magurotuna
Copy link
Member Author

@caspervonb Okay that makes sense. I'll revert collect_files and move checking for validity of target paths to lint_files and fmt where collect_files is called.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you - LGTM

Copy link
Contributor

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ry ry merged commit 91881b7 into denoland:master Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deno lint doesn't work with URLs
3 participants