cue
cue copied to clipboard
cuelang.org: preprocessor doesn't reformat .java sources
What page were you looking at?
https://cl-1198969-5--cue-cls.netlify.app/docs/tutorial/validate-data-schema-java/#step-6
What version of the site were you looking at?
https://github.com/cue-lang/cuelang.org/commit/210b2235881bd2a634d4d8dd2a4d268942292e83
What did you do?
I authored a page which contained a .java file that had inconsistent formatting. (See the occasional 8-space indent on the linked page, mixed in with 4-space-indent lines)
What did you expect?
That the preprocessor would reformat .java source files (similarly to how it handles .go and .cue files) and remove the formatting burden from the author.
What did you see instead?
Java sources are not reformatted.
Possible options: https://github.com/jhipster/prettier-java appears to be a plugin for https://prettier.io/ for Java source files.
More options found at https://github.com/rishirdua/awesome-code-formatters?tab=readme-ov-file#java:
- https://github.com/google/google-java-format
- http://notzippy.github.io/JALOPY2-MAIN/
Also some options at https://github.com/rishirdua/awesome-code-formatters?tab=readme-ov-file#general-purpose