-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add option to IDEA plugin (and CLI) to format JavaDoc #724 #986
base: develop
Are you sure you want to change the base?
Add option to IDEA plugin (and CLI) to format JavaDoc #724 #986
Conversation
* This adds an option to the IDEA plugin (checkbox) to format JavaDoc comments. It is disabled by default. * As the IDEA plugin (sometimes) uses the bootstrapping formatter service, which in turn uses the command line tool, this also add an option `--format-javadoc` to the command line tool. * To pass the options to the FormatterService loaded via service provider, I added a method `withOptions` to the service provided interface, which returns a new (immutable) instance with the updated options. Compared with the suggestion from the issue comment (palantir#724 (comment)), this (a) does not require deprecating methods and (b) the options can be set independently of where the formatter is actually used. * Since the infrastructure to pass options to the formatter now exists, we could also add more options to the code style select configuration in the IDEA plugin, but I'm not sure if that makes sense (I want to use Palantir, after all). * The issue also mentioned API compatibility. The service provider interface is compatible, most other classes and methods are internal. But if somebody more familar with the code base could take another look, that would be great. * I also added a few tests for the new option.
Thanks for your interest in palantir/palantir-java-format, @blutorange! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
Generate changelog in
|
@schlosna As far as I can see, the changelog needs to be generated by somebody with the proper permissions for this repo? |
Is there anything I still need to do before this PR can be considered for review? |
This branch has conflicts that must be resolved. |
Thanks for notifying me! I resolved the conflicts in case anybody wants to take a look at getting this merged. |
Is there any chance of getting this merged? Are you open to adding this option to the plugin or should I close this? |
As discussed in #724 (as I understand it), I added an option to the IDEA plugin to enable formattting JavaDoc comments.
--format-javadoc
to the command line tool.withOptions
to the service provided interface, which returns a new (immutable) instance with the updated options. Compared with the suggestion from the issue comment (Please expose option to format JavaDoc #724 (comment)), this (a) does not require deprecating methods and (b) the options can be set independently of where the formatter is actually used.Possible downsides?