Skip to content
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 Spotless google-formatter #42

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

timmycam
Copy link

@timmycam timmycam commented Nov 3, 2023

Added spotless/google formattter, formatted distributed-processes module files

@oskardudycz
Copy link
Owner

@timmycam, thank you a lot for the contribution! It looks good to me, with one distinction: events definition. Do you know if it's possible to respect end lines? For events, I like to keep each field in seperate lines, as they're also forms of documentation, and I think keeping them in dedicated lines makes it more readable.

@timmycam
Copy link
Author

timmycam commented Nov 4, 2023

Hey @oskardudycz , so been looking into respecting the new lines for events - and looks like there are a couple of options, but just to clarify you are talking about the record classes/code blocks specifically as to retain the format for documentation? The actual palantir and google formatters seem to be immuatble by design (for consistent styling), but I can add a step after them in the gradle format script to find records and reformat as they currently are. Or alternatively, more blunt ways could be to exclude the files by file name, or turn off the formatter for the records using comments that the formatter recognises. These are a bit more manual though.

Also seems like you are not alone with your thinking on this 😉 palantir/palantir-java-format#834

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants