mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-09 04:43:20 +08:00
Make whitespace formatter only target 8e3deb9
This commit is contained in:
parent
54548fd8ae
commit
255d982498
@ -16,14 +16,16 @@ re_keyword_space = re.compile(r'(?<=\b)(if|for|while|switch|try|else|catch|final
|
|||||||
|
|
||||||
|
|
||||||
def get_changed_filelist():
|
def get_changed_filelist():
|
||||||
subprocess.run(['git', 'fetch', UPSTREAM, f'{RATCHET}:{RATCHET}']) # Ensure LintRatchet ref is matched to upstream
|
# subprocess.run(['git', 'fetch', UPSTREAM, f'{RATCHET}:{RATCHET}']) # Ensure LintRatchet ref is matched to upstream
|
||||||
result = subprocess.run(['git', 'diff', RATCHET, '--name-only'], capture_output=True, text=True)
|
# result = subprocess.run(['git', 'diff', RATCHET, '--name-only'], capture_output=True, text=True)
|
||||||
|
# if result.returncode != 0:
|
||||||
|
# print(f'{RATCHET} not found, trying fallback {RATCHET_FALLBACK}')
|
||||||
|
print(f'Attempting to diff against {RATCHET_FALLBACK}')
|
||||||
|
result = subprocess.run(['git', 'diff', RATCHET_FALLBACK, '--name-only'], capture_output=True, text=True)
|
||||||
if result.returncode != 0:
|
if result.returncode != 0:
|
||||||
print(f'{RATCHET} not found, trying fallback {RATCHET_FALLBACK}')
|
# print('Fallback is also missing, aborting.')
|
||||||
result = subprocess.run(['git', 'diff', RATCHET_FALLBACK, '--name-only'], capture_output=True, text=True)
|
print(f'Could not find {RATCHET_FALLBACK}, aborting.')
|
||||||
if result.returncode != 0:
|
exit(1)
|
||||||
print('Fallback is also missing, aborting.')
|
|
||||||
exit(1)
|
|
||||||
return result.stdout.strip().split('\n')
|
return result.stdout.strip().split('\n')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user