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

Format code with spotless #4465

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

johannescoetzee
Copy link
Contributor

The motivation for this PR is discussed in #4408 and this is a follow-up to #4409

The changes in this PR were made by running ./run_core_metamodel_generator.sh && ./run_core_generators.sh && ./mvnw spotless:apply until the output was stable (that is to say, until running these commands again didn't result in any changes to the source files). I ran these commands with the ratcheting option disabled, so all source files in the repo were reformatted, but this should be unnecessary for regular PRs.

I did have to make a few minor manual changes where line comments // ... were used in the middle of multi-line call chains or argument lists since these were somehow being duplicated on the lines above (which is probably a pretty printer bug, but that's out of the scope of this PR). The manual changes I made were either moving these comments to the line directly before the statement they appeared in, or to turn them into block comments /* ... */

@jlerbsc
Copy link
Collaborator

jlerbsc commented Jun 12, 2024

were used in the middle of multi-line call chains or argument lists

Can you check that these particular cases are not test cases for the LPP or for the comment insertion function.

@johannescoetzee
Copy link
Contributor Author

I double checked, and the ones I changed manually were:

javaparser-core/src/main/java/com/github/javaparser/printer/ConcreteSyntaxModel.java

comment(), // FIXME: we should introduce a derived property
child(ObservableProperty.NAME), // list(ObservableProperty.EXTRA_ARRAY_LEVELS),


javaparser-core/src/main/java/com/github/javaparser/printer/DefaultPrettyPrinterVisitor.java AND
javaparser-core/src/main/java/com/github/javaparser/printer/PrettyPrintVisitor.java

final boolean // Either we hit the constant amount limit in the configurations, or...

These look unrelated to the LPP or any tests

@jlerbsc jlerbsc merged commit b843b74 into javaparser:master Jun 12, 2024
33 of 38 checks passed
@jlerbsc jlerbsc added this to the next release milestone Jun 12, 2024
@jlerbsc jlerbsc added the PR: Changed A PR that changes implementation without changing behaviour (e.g. performance) label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Changed A PR that changes implementation without changing behaviour (e.g. performance)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants