Lint script tweaks (#13093)
* Also lint working tree files When performing a git diff of upstream/dev..., git is diffing against the current HEAD, but does not include working tree files. By manually calculating a merge-base SHA to diff against, git will still diff those files. * Don't pylint tests files, since we don't in CI * Use merge base for lazytox * Simplify files changed header
This commit is contained in:
1 parent
991c457430
commit
14aa4e7694
2 files changed
+8
-6
No files matched your search
+3
-1
@@ -94,7 +94,9 @@ async def git():
|
||||
"""Exec git."""
|
||||
if len(sys.argv) > 2 and sys.argv[1] == '--':
|
||||
return sys.argv[2:]
|
||||
_, log = await async_exec('git', 'diff', 'upstream/dev...', '--name-only')
|
||||
_, log = await async_exec('git', 'merge-base', 'upstream/dev', 'HEAD')
|
||||
merge_base = log.splitlines()[0]
|
||||
_, log = await async_exec('git', 'diff', merge_base, '--name-only')
|
||||
return log.splitlines()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user