Keep formatting in case of newline only change
I think, the following diff is only a newline diff.
);
} catch (FetcherException e) {
- LOGGER.error(
- "FetcherException should not be found here, as main Bibtex Entry already exists "
- + "(and failing additional fetches should be skipped)",
- e
+ LOGGER.error("FetcherException should not be found here, as main Bibtex Entry already exists " + "(and failing additional fetches should be skipped)", e
);
}
}
I am going to use prettier-java with 80 column width. And now OpenRewrite and prettier-java "fight" about proper formatting.
I think, a solution of that could be if OpenRewrite does not change the AST if there are only whitespace changes.
Hmm; the console output or data table should show which recipe is making those changes. Sounds like a potential bug with the recipe where it should not be making whitespace only changes. Which one is it? And is there a wider context you can share?
Oh, sorry, I forgot. The most broad context I can give that this is the PR: https://github.com/JabRef/jabref-koppor/pull/717
I filed here because I needed to disable org.openrewrite.java.logging.slf4j.ParameterizedLogging
(The other one was org.openrewrite.staticanalysis.ChainStringBuilderAppendCalls)
That's odd; I'd not expect either of those to make changes here; especially not when it's only whitespace changes. 🤔