diff options
-rw-r--r-- | lib/python/qmk/cli/cformat.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py index 6bcd15a11..5aab31843 100644 --- a/lib/python/qmk/cli/cformat.py +++ b/lib/python/qmk/cli/cformat.py | |||
@@ -23,8 +23,6 @@ def cformat_run(files, all_files): | |||
23 | if not files: | 23 | if not files: |
24 | cli.log.warn('No changes detected. Use "qmk cformat -a" to format all files') | 24 | cli.log.warn('No changes detected. Use "qmk cformat -a" to format all files') |
25 | return False | 25 | return False |
26 | if files and all_files: | ||
27 | cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(files)) | ||
28 | subprocess.run(clang_format + [file for file in files], check=True) | 26 | subprocess.run(clang_format + [file for file in files], check=True) |
29 | cli.log.info('Successfully formatted the C code.') | 27 | cli.log.info('Successfully formatted the C code.') |
30 | 28 | ||
@@ -48,6 +46,8 @@ def cformat(cli): | |||
48 | # Find the list of files to format | 46 | # Find the list of files to format |
49 | if cli.args.files: | 47 | if cli.args.files: |
50 | files.extend(normpath(file) for file in cli.args.files) | 48 | files.extend(normpath(file) for file in cli.args.files) |
49 | if cli.args.all_files: | ||
50 | cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(map(str, files))) | ||
51 | # If -a is specified | 51 | # If -a is specified |
52 | elif cli.args.all_files: | 52 | elif cli.args.all_files: |
53 | all_files = c_source_files(core_dirs) | 53 | all_files = c_source_files(core_dirs) |