diff options
author | Joel Challis <[email protected]> | 2022-06-14 14:54:46 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-14 14:54:46 +0100 |
commit | f37de9a212e79e9c4c05c4298ba82ffe527d7132 (patch) | |
tree | 95f39b086111c97a759a14d7890035bae8d7ced9 /lib/python/qmk/git.py | |
parent | 15dab01e6ae68b47cf9df88ca935cbcc3f41d907 (diff) | |
download | qmk_firmware-f37de9a212e79e9c4c05c4298ba82ffe527d7132.tar.gz qmk_firmware-f37de9a212e79e9c4c05c4298ba82ffe527d7132.zip |
Perform stricter lint checks (#17348)
Diffstat (limited to 'lib/python/qmk/git.py')
-rw-r--r-- | lib/python/qmk/git.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/python/qmk/git.py b/lib/python/qmk/git.py index beeb689144..f493628492 100644 --- a/lib/python/qmk/git.py +++ b/lib/python/qmk/git.py @@ -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() |