-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
feat: file not found error #802
Conversation
My sincere apologies for the lack of any review of this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Thanks and my apologies for a (very) delayed code review.
A couple of comments, but looking well otherwise.
Thank you for the review ! I will be sure to change & commit this weekend (I don't have the time to test right everything right now) 😉 |
@HugoSentelien could you allow external contributions to your branch? :) |
@P0lip Thank you so much for the suggestion, sorry for not making it yet, it seems like something is coming up every day since some weeks (the worst was when I had to see for adding custom type and their rule in spectral, while knowing I had to update this branch without having the time xD). Could you guide me on how to give you this authorization please? Because it seems like the authorization is already granted from my UI 👀 |
Oops, sorry for lack of any response. Didn't notice you responded. |
36f5f15
to
7e88217
Compare
7e88217
to
34dbeed
Compare
I finally managed to wrap it up! |
src/cli/commands/lint.ts
Outdated
'ignore-unmatched-globs': { | ||
description: 'do not warn about unmatched glob patterns', | ||
type: 'boolean', | ||
default: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but this may result in some perf hit, as we might need to visit several directories multiple times.
Might be a not big deal, though. I'll consider doing it before we merge the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could rename the option to show-unmatched-globs
. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nulltoken bump
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@P0lip Sorry. I overlooked this one :(
Change return type of listFiles. Call fg for each files. Create error in linter.ts for each file not found.
Change of return value of lsitFiles = change of unit test
205a572
to
78a5f5f
Compare
fa7161d
to
3362482
Compare
Alright folks, since 5.3 is just around the corner, I'm proceeding with this one. |
* File not found error Change return type of listFiles. Call fg for each files. Create error in linter.ts for each file not found. * Update of test Change of return value of lsitFiles = change of unit test * refactor: a few minor changes * chore: wip * refactor: wrap it up * chore: rename to show-unmatched-globs Co-authored-by: HugoSentelien <[email protected]>
Thank you @P0lip and @nulltoken ! Thank you for your hardwork, and sorry for not having be there at all 🙄 |
Display when the file specification file is not found.
Changes
Changed return type of listFiles.
Called fg for each files in listFiles
Created error in linter.ts for each file not found.
Fixes #801.
Checklist
Does this PR introduce a breaking change?
Screenshots
Test not passing
I know this PR will not be accepted as it is, because this test isn't going though because of my change:
I get it is because I am calling fg for each file while the previous one was for every files at once.
But, I have no idea how to do it to keep a test with the same usefulness.
I did change the same file to update the test "returns file paths" because of the change of return type of listFiles.
Thank you in advance for reviewing this :)