Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Make
chplcheck
available fromchpl-language-server
#25214Make
chplcheck
available fromchpl-language-server
#25214Changes from 8 commits
9eb12f7
74ce515
20b9b22
a7ae01a
494ec0c
a9b926b
0408cba
3d0fb25
d3afcf2
e784e8c
29a473b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I suggest you wrap this in a class that contain the various modules. Something like this:
A few of things:
chplcheck.main
orchplcheck.lsp
.ValueError
s that you raise, consider just making this a static method and returningNone
to avoid thenone-try-some
in the main body.--chplcheck
was thrown, but then you'd need to have some kind of two-phase parsing.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.
I've added a proxy object
I think this is the ideal from a purity standpoint, but maybe not the most practical. Its possible to do
parse_known_args
, and then do some extra parsing of the command line arguments. But this adds extra complexity to our parsing that I don't want to have to maintain, and I am not sure there is much benefitThere 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.
If you have a
ChplcheckProxy
object, you can makeself.lint_driver
beself.chplcheck.lint_driver
, and move this code into a method on the proxy. Seems cleaner that way.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.
I would rather keep this code out of a global object