cue-lang / cue

The home of the CUE language! Validate and define text-based and dynamic configuration
https://cuelang.org
Apache License 2.0
5.12k stars 292 forks source link

cuelang.org: preprocessor doesn't reformat .java sources #3363

Open jpluscplusm opened 2 months ago

jpluscplusm commented 2 months ago

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.

jpluscplusm commented 2 months ago

Possible options: https://github.com/jhipster/prettier-java appears to be a plugin for https://prettier.io/ for Java source files.

jpluscplusm commented 2 months ago

More options found at https://github.com/rishirdua/awesome-code-formatters?tab=readme-ov-file#java:

Also some options at https://github.com/rishirdua/awesome-code-formatters?tab=readme-ov-file#general-purpose