Skip to content

Commit bf5ef1c

Browse files
dsychgoogle-java-format Team
authored andcommitted
Allowing to turn off java doc formatting
`google-java-format-diff.py` is missing a flag to turn off java docs formatting, which is present on the main jar. This pr introduces this flag: `--skip-docs` Fixes #571 COPYBARA_INTEGRATE_REVIEW=#571 from dsych:missing-docs-switch 9657b75 PiperOrigin-RevId: 386554591
1 parent 165c106 commit bf5ef1c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/google-java-format-diff.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ def main():
5959
help='do not fix the import order')
6060
parser.add_argument('--skip-removing-unused-imports', action='store_true',
6161
help='do not remove ununsed imports')
62+
parser.add_argument(
63+
'--skip-javadoc-formatting',
64+
action='store_true',
65+
default=False,
66+
help='do not reformat javadoc')
6267
parser.add_argument('-b', '--binary', help='path to google-java-format binary')
6368
parser.add_argument('--google-java-format-jar', metavar='ABSOLUTE_PATH', default=None,
6469
help='use a custom google-java-format jar')
@@ -116,6 +121,8 @@ def main():
116121
command.append('--skip-sorting-imports')
117122
if args.skip_removing_unused_imports:
118123
command.append('--skip-removing-unused-imports')
124+
if args.skip_javadoc_formatting:
125+
command.append('--skip-javadoc-formatting')
119126
command.extend(lines)
120127
command.append(filename)
121128
p = subprocess.Popen(command, stdout=subprocess.PIPE,

0 commit comments

Comments
 (0)