Skip to content

Add spotless plugin configuration#4409

Merged
jlerbsc merged 3 commits intojavaparser:masterfrom
johannescoetzee:johannes/spotless-plugin
Jun 12, 2024
Merged

Add spotless plugin configuration#4409
jlerbsc merged 3 commits intojavaparser:masterfrom
johannescoetzee:johannes/spotless-plugin

Conversation

@johannescoetzee
Copy link
Copy Markdown
Collaborator

See #4408 for an extended motivation.

Spotless supports a few Java formatters, but I personally like Palantir the most. It generally follows the google style guide for Java, with some nice readability improvements. Some more details can be found at https://github.com/diffplug/spotless/tree/2d21c62cdfb83237ca4a5f48ad3b143a0580c5be/plugin-maven#java and https://github.com/palantir/palantir-java-format

pom.xml Outdated
<trimTrailingWhitespace/>
<endWithNewline/>
<indent>
<tabs>true</tabs>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this parameter mean that tabs are retained or replaced by spaces?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means tabs are retained, but this section doesn't cover java code (that's handled in the <java> section below) but instead just .gitattributes and .gitignore.

I think I'll just remove this section for now since the focus of this change should just be the java source files, which is already a large enough change

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.003%. Comparing base (15a21da) to head (49dd3ed).
Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #4409   +/-   ##
=========================================
  Coverage   52.003%   52.003%           
=========================================
  Files          507       507           
  Lines        28654     28654           
  Branches      4969      4969           
=========================================
  Hits         14901     14901           
  Misses       11684     11684           
  Partials      2069      2069           
Flag Coverage Δ
AlsoSlowTests 52.003% <ø> (ø)
javaparser-core 52.003% <ø> (ø)
javaparser-symbol-solver 52.003% <ø> (ø)
jdk-10 51.999% <ø> (ø)
jdk-11 51.999% <ø> (ø)
jdk-12 51.999% <ø> (ø)
jdk-13 51.999% <ø> (ø)
jdk-14 51.999% <ø> (ø)
jdk-15 51.999% <ø> (ø)
jdk-16 51.999% <ø> (ø)
jdk-17 51.999% <ø> (ø)
jdk-18 51.999% <ø> (ø)
jdk-8 51.998% <ø> (ø)
jdk-9 51.999% <ø> (ø)
macos-latest 51.996% <ø> (ø)
ubuntu-latest 51.996% <ø> (ø)
windows-latest 51.982% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab902c7...49dd3ed. Read the comment docs.

@jlerbsc jlerbsc merged commit 031f6d8 into javaparser:master Jun 12, 2024
@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