diff options
author | Aurimas Liutikas <aurimas@google.com> | 2017-12-12 09:47:00 -0800 |
---|---|---|
committer | Aurimas Liutikas <aurimas@google.com> | 2017-12-12 09:47:00 -0800 |
commit | a6100281b01aaa767bbe56d9c6965036481602b8 (patch) | |
tree | 3a98655508ae1d8c4e42640878d69d21fbe571c0 | |
parent | 30ef8f6084b137fcbbd75e4916d60f9d5fd84021 (diff) | |
download | platform_prebuilts_ktlint-a6100281b01aaa767bbe56d9c6965036481602b8.tar.gz platform_prebuilts_ktlint-a6100281b01aaa767bbe56d9c6965036481602b8.tar.bz2 platform_prebuilts_ktlint-a6100281b01aaa767bbe56d9c6965036481602b8.zip |
Allow calling ktlint.py without any files.
This is needed to support repo upload when the only change is
deleted files and thus passed in list of files is empty.
Test: local repo upload
Change-Id: Ie2e36b29a67824cd1aced2e56d7fca3eec6a30bc
-rwxr-xr-x | ktlint.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -30,7 +30,7 @@ KTLINT_JAR = os.path.join(MAIN_DIRECTORY, 'ktlint-android-all.jar') def main(args=None): parser = argparse.ArgumentParser() - parser.add_argument('--file', '-f', nargs='+') + parser.add_argument('--file', '-f', nargs='*') args = parser.parse_args() kotlin_files = [f for f in args.file if f.endswith('.kt')] if not kotlin_files: |