summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-01-03 22:42:47 +0000
committerQMK Bot <hello@qmk.fm>2022-01-03 22:42:47 +0000
commitc089541938610c6dcd6641ae67cf7ca6fe946274 (patch)
tree63debef8e680225dff792b5323ad4c14dcc0bbb3
parent73e372d920dfedce3c026f05886f416529e94d3c (diff)
parent550c9a315f146bc30fc828726d977f3f41477d52 (diff)
downloadqmk_firmware-c089541938610c6dcd6641ae67cf7ca6fe946274.tar.gz
qmk_firmware-c089541938610c6dcd6641ae67cf7ca6fe946274.zip
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--lib/python/qmk/cli/format/c.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/python/qmk/cli/format/c.py b/lib/python/qmk/cli/format/c.py
index fe2f97da94..8eb7fa1ed0 100644
--- a/lib/python/qmk/cli/format/c.py
+++ b/lib/python/qmk/cli/format/c.py
@@ -74,17 +74,16 @@ def filter_files(files, core_only=False):
"""Yield only files to be formatted and skip the rest
"""
files = list(map(normpath, filter(None, files)))
- if core_only:
- # Filter non-core files
- for index, file in enumerate(files):
+
+ for file in files:
+ if core_only:
# The following statement checks each file to see if the file path is
# - in the core directories
# - not in the ignored directories
if not any(is_relative_to(file, i) for i in core_dirs) or any(is_relative_to(file, i) for i in ignored):
- del files[index]
cli.log.debug("Skipping non-core file %s, as '--core-only' is used.", file)
+ continue
- for file in files:
if file.suffix[1:] in c_file_suffixes:
yield file
else: