fix `RemoveUnusedImportsStep` leftovers
depends on:
- https://github.com/diffplug/spotless/pull/2541
ref:
- https://github.com/google/google-java-format/pull/1262
fix #1261
implementation fixed by reliable contributor @iddeepak
Thanks for this initiative.
- https://github.com/google/google-java-format/pull/1262
- https://github.com/google/google-java-format/pull/1262#issuecomment-3014695342
before: 14 issues:
now: 10 issues:
Thanks for your interest in palantir/palantir-java-format, @Pankraz76! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.
Generate changelog in changelog/@unreleased
changelog/@unreleasedType (Select exactly one)
- [ ] Feature (Adding new functionality)
- [ ] Improvement (Improving existing functionality)
- [ ] Fix (Fixing an issue with existing functionality)
- [ ] Break (Creating a new major version by breaking public APIs)
- [ ] Deprecation (Removing functionality in a non-breaking way)
- [ ] Migration (Automatically moving data/functionality to a new system)
Description
Check the box to generate changelog(s)
- [ ] Generate changelog entry
https://github.com/palantir/palantir-java-format/blob/f537f78e6fc8697e18ce05fa5b95f2cddc0b5e9f/palantir-java-format/src/main/java/com/palantir/javaformat/java/RemoveUnusedImports.java#L348 fixedRanges is not used ? @Pankraz76
fixedRanges is not used ? @Pankraz76
as no (mutation) test coverage imposed, of course not. Whole branch makes no sense in this case:
- https://github.com/palantir/palantir-java-format/blob/f537f78e6fc8697e18ce05fa5b95f2cddc0b5e9f/palantir-java-format/src/main/java/com/palantir/javaformat/java/RemoveUnusedImports.java#L363
Good catch!
issue: formattingWithoutImportOrdering() com.palantir.javaformat.java.FormatterTest
fixes empty line issue, added this test case to import tests as well, as important. Good that we have tests.