1
0
Fork 0

Perform stricter lint checks (#17348)

This commit is contained in:
Joel Challis 2022-06-14 14:54:46 +01:00 committed by GitHub
parent 15dab01e6a
commit f37de9a212
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 97 additions and 29 deletions

View file

@ -108,3 +108,12 @@ def git_check_deviation(active_branch):
cli.run(['git', 'fetch', 'upstream', active_branch])
deviations = cli.run(['git', '--no-pager', 'log', f'upstream/{active_branch}...{active_branch}'])
return bool(deviations.returncode)
def git_get_ignored_files(check_dir='.'):
"""Return a list of files that would be captured by the current .gitingore
"""
invalid = cli.run(['git', 'ls-files', '-c', '-o', '-i', '--exclude-standard', check_dir])
if invalid.returncode != 0:
return []
return invalid.stdout.strip().splitlines()