Skip to content

Preserve standalone version catalog comments - #3049

Open
aoto-tech wants to merge 2 commits into
diffplug:mainfrom
aoto-tech:fix/version-catalog-standalone-comments
Open

Preserve standalone version catalog comments#3049
aoto-tech wants to merge 2 commits into
diffplug:mainfrom
aoto-tech:fix/version-catalog-standalone-comments

Conversation

@aoto-tech

Copy link
Copy Markdown
Contributor

Fixes #3048.

Summary

  • preserve standalone comments at section boundaries and EOF
  • keep trailing comments attached to their originating section when tables are sorted
  • ignore terminal blank lines so the formatter does not add extra newlines

Testing

  • ./gradlew.bat :testlib:test --tests com.diffplug.spotless.toml.VersionCatalogStepTest --no-daemon --no-configuration-cache --no-build-cache --max-workers=1 (38 tests passed)
  • ./gradlew.bat :lib:spotlessJavaCheck :testlib:spotlessJavaCheck --no-daemon --no-configuration-cache --no-build-cache --max-workers=1
  • git diff --check

@aoto-tech

Copy link
Copy Markdown
Contributor Author

wait Reviewers status!

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.

versionCatalog() silently deletes standalone comments at section boundaries and EOF

1 participant