From c2709510562e304e6d7f69d7aa844292e11cc989 Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Wed, 1 Oct 2025 07:41:38 -0700 Subject: [PATCH] docs: Update README with a bit more details about available flags Fixes #1285. @cushon Fixes #1288 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/google-java-format/pull/1288 from vorburger:patch-8 65730127f1386179ebdc20154bafdbfd6df2eb59 PiperOrigin-RevId: 813749351 --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index ab55679ab..1539f7564 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,15 @@ The formatter can act on whole files, on limited lines (`--lines`), on specific offsets (`--offset`), passing through to standard-out (default) or altered in-place (`--replace`). +Option `--help` will print full usage details; including built-in documentation +about other flags, such as `--aosp`, `--fix-imports-only`, +`--skip-sorting-imports`, `--skip-removing-unused-import`, +`--skip-reflowing-long-strings`, `--skip-javadoc-formatting`, or the `--dry-run` +and `--set-exit-if-changed`. + +Using `@` reads options and filenames from a file, instead of +arguments. + To reformat changed lines in a specific patch, use [`google-java-format-diff.py`](https://github.com/google/google-java-format/blob/master/scripts/google-java-format-diff.py).