Skip to content

Add skipRemovingUnusedImports and skipReflowingLongStrings#208

Merged
andreasfolkesson merged 3 commits intomainfrom
add_more_options
Sep 17, 2025
Merged

Add skipRemovingUnusedImports and skipReflowingLongStrings#208
andreasfolkesson merged 3 commits intomainfrom
add_more_options

Conversation

@andreasfolkesson
Copy link
Contributor

Add support for additional Google Java Format options

Summary

  • Add skipRemovingUnusedImports configuration option to control unused import removal
  • Add skipReflowingLongStrings configuration option to control string wrapping behavior

Changes Made

  • New configuration options: Added two new boolean parameters to control formatting behavior
    • skipRemovingUnusedImports - defaults to false (removes unused imports by default)
    • skipReflowingLongStrings - defaults to true (skips string reflowing for backwards compatibility)
  • Documentation: Updated README.md with configuration examples and descriptions for new options
  • Maven integration: Added new parameters to AbstractFMT with proper @parameter annotations

Backwards Compatibility

  • skipReflowingLongStrings defaults to true to maintain existing behavior
  • skipRemovingUnusedImports defaults to false to maintain existing import removal behavior
  • All existing configurations continue to work without changes

Closes #197

- skipRemovingUnusedImports defaults to false
- skipReflowingLongStrings defaults to true for backwards compatibility
@andreasfolkesson andreasfolkesson merged commit f52caf7 into main Sep 17, 2025
4 checks passed
@robertomlsoares robertomlsoares deleted the add_more_options branch September 17, 2025 11:50
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.

Support more options available to google formatter

3 participants