summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2020-12-10 19:03:17 +0000
committerQMK Bot <hello@qmk.fm>2020-12-10 19:03:17 +0000
commited76f4394fd95413f7da11e2342b0965182ccb95 (patch)
treea307cc3cd69b1dfd9c0eeb1a547907afd54d493e
parentf77f715aa2215ae08920f8c2929c3b181657456d (diff)
parent5b5d74a2677c281d12cd69825d2e252842786667 (diff)
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--lib/python/qmk/cli/cformat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py
index 6bcd15a110..5aab31843c 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):
if not files:
cli.log.warn('No changes detected. Use "qmk cformat -a" to format all files')
return False
- if files and all_files:
- cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(files))
subprocess.run(clang_format + [file for file in files], check=True)
cli.log.info('Successfully formatted the C code.')
@@ -48,6 +46,8 @@ def cformat(cli):
# Find the list of files to format
if cli.args.files:
files.extend(normpath(file) for file in cli.args.files)
+ if cli.args.all_files:
+ cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(map(str, files)))
# If -a is specified
elif cli.args.all_files:
all_files = c_source_files(core_dirs)