-
Notifications
You must be signed in to change notification settings - Fork 6k
Allow opening files at a specific line and column (fixes #5619) #5620
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5620 +/- ##
==========================================
+ Coverage 72.44% 72.52% +0.08%
==========================================
Files 30 30
Lines 1673 1678 +5
Branches 366 366
==========================================
+ Hits 1212 1217 +5
Misses 398 398
Partials 63 63
Continue to review full report at Codecov.
|
@danog do you plan to add tests? also, can you add to the PR description steps for testing this locally? |
Well it's pretty simple to test this locally, just open a workspace and run |
Debug builds can be tested using |
Thank you! I tested locally and it worked like a charm! Screen.Recording.2022-10-05.at.12.39.19.PM.movCan you please add some tests? |
export const isDirectory = async (path: string): Promise<boolean> => { | ||
try { | ||
const stat = await fs.stat(path) | ||
return stat.isDirectory() | ||
} catch (error) { | ||
return false | ||
} | ||
} | ||
|
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.
Maybe add a test for this?
cc @code-asher - i tested locally but would love to get your thoughts too 👍🏼 |
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.
Looks great. Glad it was so simple! Adding a simple test sounds like a good idea to me as well, can pretty much just copy the isFile
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.
Add a test and then we should be good to merge!
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.
Awesome! Looks good to me 👍🏼
Thanks again for your contribution @danog! 🎉 |
Thanks for merging, could I have a tag please? :) |
@danog by that do you mean tagged in the release notes? :D |
I mean a new release, I've been thinking of proposing code-server as an alternative IDE at work, and our workflow heavily relies on the feature introduced in this PR :) |
I think URL param-like r support is welcome. |
We have an open issue for that: #1964 |
Fixes #5619