Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scripts/google-java-format-diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def main():
help='use AOSP style instead of Google Style (4-space indentation)')
parser.add_argument('--skip-sorting-imports', action='store_true',
help='do not fix the import order')
parser.add_argument('--skip-removing-unused-imports', action='store_true',
help='do not remove ununsed imports')
parser.add_argument('-b', '--binary', help='path to google-java-format binary')
parser.add_argument('--google-java-format-jar', metavar='ABSOLUTE_PATH', default=None,
help='use a custom google-java-format jar')
Expand Down Expand Up @@ -112,6 +114,8 @@ def main():
command.append('--aosp')
if args.skip_sorting_imports:
command.append('--skip-sorting-imports')
if args.skip_removing_unused_imports:
command.append('--skip-removing-unused-imports')
command.extend(lines)
command.append(filename)
p = subprocess.Popen(command, stdout=subprocess.PIPE,
Expand Down