dependabot[bot] opened a new pull request, #17009: URL: https://github.com/apache/lucene/pull/17009
Bumps [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format) from 1.37.0 to 2.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/google/google-java-format/releases">com.google.googlejavaformat:google-java-format's releases</a>.</em></p> <blockquote> <h2>v2.0.0</h2> <p>google-java-format 2.0.0 replaces the formatter's layout engine, and makes some improvements to lambda formatting (<a href="https://redirect.github.com/google/google-java-format/issues/19">#19</a>). This release also adds an optional cleanup pass that makes small non-whitespace changes, which is enabled by default.</p> <p>Because of these changes, 2.0.0 reformats more existing code than a typical release. We recommend reformatting your codebase in a single commit when upgrading.</p> <h2>Formatting changes</h2> <ul> <li> <p>A lambda that is the only argument of a call is now kept on the same line as the call, instead of starting on a new line with an extra level of indentation (<a href="https://redirect.github.com/google/google-java-format/issues/19">#19</a>):</p> <pre lang="java"><code>executor.submit(() -> { doSomething(); }); </code></pre> </li> <li> <p>Text blocks are now indented as part of the main formatting pass, so their indentation is correct even with <code>--skip-reflowing-long-strings</code>.</p> </li> <li> <p>Fixed indentation of comments after <code>assert</code>, enum constants, <code>for</code> initializers, <code>try</code> resources, multi-catch clauses, and type arguments.</p> </li> </ul> <h2>Cleanups</h2> <ul> <li> <p>Added a <code>--cleanup</code> flag, enabled by default, for small non-whitespace changes:</p> <ul> <li>removing redundant semicolons</li> <li>removing empty annotation parentheses (<code>@Foo()</code> → <code>@Foo</code>)</li> <li>removing parentheses around a single untyped lambda parameter (<code>(x) -> ...</code> → <code>x -> ...</code>) (<a href="https://redirect.github.com/google/google-java-format/issues/762">#762</a>)</li> </ul> <p>Cleanups only apply to the ranges being formatted. Use <code>--cleanup=false</code> to only change whitespace (and the existing <code>--skip-sorting-imports</code>, <code>--skip-removing-unused-imports</code>, and <code>--skip-reordering-modifiers</code> flags for the other non-whitespace changes).</p> </li> <li> <p>When formatting a range with <code>--lines</code> or <code>--offset</code> and cleanups enabled, unformatted statements outside the range are re-indented to match the formatted output, so an edit that adds or removes a level of nesting doesn't leave the surrounding code misaligned. Blank lines left behind by cleanups are removed.</p> </li> </ul> <h2>Configuration</h2> <ul> <li><code>--max-line-length=N</code> sets the column limit (default 100) (<a href="https://redirect.github.com/google/google-java-format/issues/425">#425</a>). (This flag was introduced in <a href="https://github.com/google/google-java-format/releases/tag/v1.37.0">v1.37.0</a>)</li> </ul> <h2>Language support</h2> <ul> <li>Support value classes and value records (<a href="https://openjdk.org/jeps/401">JEP 401: Value Objects (Preview)</a>)</li> </ul> <h2>Javadoc</h2> <ul> <li>Strip trailing asterisks before <code>*/</code> (<a href="https://redirect.github.com/google/google-java-format/issues/67">#67</a>).</li> <li>Preserve relative indentation in <code><pre>{@code ...}</code> blocks without leading <code>*</code>.</li> <li>Join hyphenated words broken across lines.</li> </ul> <h2>Long strings</h2> <ul> <li>When formatting a range with <code>--lines</code> or <code>--offset</code>, only long string literals in the requested range are reflowed (<a href="https://redirect.github.com/google/google-java-format/issues/1114">#1114</a>).</li> <li>Escaped backslashes (e.g. <code>\\t</code> in a Windows path or a regular expression) are no longer split when reflowing long string literals (<a href="https://redirect.github.com/google/google-java-format/issues/1186">#1186</a>, <a href="https://redirect.github.com/google/google-java-format/issues/1253">#1253</a>, <a href="https://redirect.github.com/google/google-java-format/issues/1439">#1439</a>).</li> <li>Failures while reflowing long strings are reported as errors instead of crashing or hanging the CLI (<a href="https://redirect.github.com/google/google-java-format/issues/1439">#1439</a>).</li> </ul> <h2>Other fixes</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/google/google-java-format/commit/246202f548df50e63159e95912d42ddb5411a93a"><code>246202f</code></a> Release google-java-format 2.0.0</li> <li><a href="https://github.com/google/google-java-format/commit/e01cd0279e4e1525048204b0deffd8771ffa21f1"><code>e01cd02</code></a> Only reflow long strings in the requested lines when partially formatting.</li> <li><a href="https://github.com/google/google-java-format/commit/7e4696dd6b965d7f73e20a80f852f51fadf3b8a6"><code>7e4696d</code></a> Don't split escaped backslashes when reflowing long string literals.</li> <li><a href="https://github.com/google/google-java-format/commit/7cfa88bb525778dcd5cd4d6fda672ac357cc91b4"><code>7cfa88b</code></a> Fix the flag name in the error for using --dry-run with --replace.</li> <li><a href="https://github.com/google/google-java-format/commit/044bbe618eb3853a1902e9b704d723658c99366e"><code>044bbe6</code></a> Bundle commonmark in the Eclipse plugin.</li> <li><a href="https://github.com/google/google-java-format/commit/722d074791787034c35d15adc785bf4d0f6ace21"><code>722d074</code></a> Report string wrapping failures without crashing or hanging the CLI.</li> <li><a href="https://github.com/google/google-java-format/commit/93bb96d40cd52801399e8ed23a09feb822f49e35"><code>93bb96d</code></a> Add tests demonstrating unclosed Javadoc inline tags leaving comments unforma...</li> <li><a href="https://github.com/google/google-java-format/commit/2980bad61507c0cbea612fe6df8cdd98a003ac39"><code>2980bad</code></a> Join hyphenated words broken across lines in Javadoc comments.</li> <li><a href="https://github.com/google/google-java-format/commit/0452ffde75c9fd09181e055825d9be9d0c0c99ea"><code>0452ffd</code></a> Use text blocks for multi-line expected output in layout tests.</li> <li><a href="https://github.com/google/google-java-format/commit/0b3c7427bdda30af5ef498605bab0009ddfdc34d"><code>0b3c742</code></a> Don't hug on the first line of statement headers that are followed by a body.</li> <li>Additional commits viewable in <a href="https://github.com/google/google-java-format/compare/v1.37.0...v2.0.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
