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(fmt, lint): Make sure that target paths are not directory #8375

Merged
merged 6 commits into from
Nov 14, 2020

Conversation

magurotuna
Copy link
Member

@magurotuna magurotuna commented Nov 13, 2020

Fixes #8374

I'll fix more and add tests, so WIP for now. Done

@bartlomieju
Copy link
Member

@magurotuna huge thanks for looking into this! I noticed that in fs.rs there is files_in_subtree method used in a few places. Do you think we could combine the two implementations into a single one?

@magurotuna
Copy link
Member Author

@bartlomieju Oh, I missed files_in_subtree, thanks for pointing out. It seems usable in this fix. I'll try it tomorrow :)

@magurotuna magurotuna marked this pull request as ready for review November 14, 2020 06:24
@magurotuna
Copy link
Member Author

@bartlomieju PTAL😉

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

I verified that problem described in #8374 is no longer present. Great fix and cleanup @magurotuna, thanks!

Comment on lines +207 to +219
// dir.ts
// ├── a.ts
// ├── b.js
// ├── child
// │ ├── e.mjs
// │ ├── f.mjsx
// │ ├── .foo.TS
// │ └── README.md
// ├── c.tsx
// ├── d.jsx
// └── ignore
// ├── g.d.ts
// └── .gitignore
Copy link
Member

Choose a reason for hiding this comment

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

👍

@bartlomieju bartlomieju merged commit 3a0ebff into denoland:master Nov 14, 2020
@magurotuna magurotuna deleted the issue8374 branch November 14, 2020 13:50
jannes pushed a commit to jannes/deno that referenced this pull request Dec 1, 2020
…nd#8375)

This commit merges implementations of "collect_files" and "files_in_subtree",
leaving only the former. Additionally it was ensured that directories are not yielded
from this function.
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.

regression: deno fmt directory matching fails
2 participants