-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[core] Language properties CLI surface syntax #2947
Comments
I think beyond exposing this within the CLI (which is somewhat easy in PMD 7 with PicoCli, very similar to what was already done to expose and document renderer properties), we should probably think about having a
|
@jsotuyod to give you a bit of context - in the last meeting we discussed whether this needs to be done before pmd7 and the conclusion was, it is not necessary. So, we removed it from the pmd6 milestone. |
This is about the part of #2518 that could be targeted to master (6.31.0) to accompany #2864
This ticket is just about to add this form of argument to the cli:
-L<langId>:<propName> <value>
, or some form of this depending on what JCommander supports wellI don't think we should aim to implement the data flow from the command-line arg parsing to the language instance in this ticket. It's probably difficult to do on master, easier on the 7.0 branch, and will stay alive longer on that branch. So this part is still in #2518
Instead, what #2864, and #2830 do is to add attributes to the ParserOptions, as this is what parsers get as their input. Linking the CLI to the ParserOptions can be done with a system property as a swap, which is mostly already implemented in #2864 I think
TODO
--help
?This should probably be prominently marked experimental everywhere it is mentioned for at least a few releases, maybe even until PMD 7. But the api surface is I think quite small since it's just one form of arguments.
I think this task could shave a big chunk off #2518, because the user documentation will probably not need to change too much
See also:
pmd/pmd-core/src/main/java/net/sourceforge/pmd/lang/LanguageProcessorRegistry.java
Lines 152 to 156 in 642716f
pmd/pmd-core/src/main/java/net/sourceforge/pmd/PmdAnalysis.java
Lines 213 to 218 in 642716f
The text was updated successfully, but these errors were encountered: