-
Couldn't load subscription status.
- Fork 1.3k
Expose a setting to allow a user modify the working directory of linters #15171
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
Expose a setting to allow a user modify the working directory of linters #15171
Conversation
|
This may need to change after #15266 is merged. |
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.
Hi @matthewshirley, thank you for your contribution!
Yep please add tests, src/test/linters/lint.functional.test.ts would be a good spot for them. Adding them to the existing suite should be fine.
I left a couple of comments regarding the type of the python.linting.cwd setting, they apply to src/test/linters/common.ts and src/test/mockClasses.ts as well.
|
Any progress? Dying for this feature. |
|
@bl-ue Waiting on @matthewshirley to address the comments. |
|
I will respond and work on tests for the PR this week. 👍 Thanks for the patience. |
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.
Please have a look at
| protected getWorkspaceRootPath(document: vscode.TextDocument): string { |
Attempt to find all references to the method.

It looks like we assume that is the cwd in these places. For eg.
| const cwd = this.getWorkspaceRootPath(document); |
I think you'll need to adjust that method to return the correct
cwd using the setting instead of the workspace root, and use the workspace root as default cwd if not set.
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.
LGTM, thanks!
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.
Thank you again for your contribution, @matthewshirley! 🥳
|
🚀 🎊 🎉 |
|
Thank you so much for this! |
Closes #15170
Has sufficient logging.Has telemetry for enhancements.The wiki is updated with any design decisions/details.Labels
Needs
skip package*.jsonTests
I'm uncertain where to introduce tests for this PR. I couldn't identify where it would fit. Let me know if they're need and the best suite for them. 💪