diff options
author | Jack He <siyuanh@google.com> | 2020-04-24 10:58:38 -0700 |
---|---|---|
committer | Jack He <siyuanh@google.com> | 2020-04-24 10:59:55 -0700 |
commit | c5ca7d3a766f84d58119d18d8df738975204c7a9 (patch) | |
tree | e17f4c6718b339b56d0a4300d2a1d6f21d3d1e19 /system/tools/scripts/yapf_checker.py | |
parent | 974abb3113992dad597226b1c3464187da4e1da7 (diff) |
Exclude deleted Python files from YAPF checker
Test: upload a commit with deleted Python file
Change-Id: I9cbf427eeafec992d1a8ecc0030ec5effcf9f3de
Diffstat (limited to 'system/tools/scripts/yapf_checker.py')
-rwxr-xr-x | system/tools/scripts/yapf_checker.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/system/tools/scripts/yapf_checker.py b/system/tools/scripts/yapf_checker.py index 86f1f39632..f6dd2c9d25 100755 --- a/system/tools/scripts/yapf_checker.py +++ b/system/tools/scripts/yapf_checker.py @@ -23,7 +23,9 @@ PYTHONPATH_KEY = 'PYTHONPATH' COMMIT_ID_ENV_KEY = 'PREUPLOAD_COMMIT' ANDROID_BUILD_TOP_KEY = 'ANDROID_BUILD_TOP' DEFAULT_YAPF_DIR = 'external/yapf' -GIT_COMMAND = ['git', 'diff-tree', '--no-commit-id', '--name-only'] +GIT_COMMAND = [ + 'git', 'diff-tree', '--no-commit-id', '--name-only', '--diff-filter=d' +] def main(): |