From 285afa3a8a2c3ae6ad4efffecdc96108f1b2fadc Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 29 Nov 2021 15:08:39 +0000 Subject: Fix 'format-c --core-only' matching keyboard level folders (#15337) --- lib/python/qmk/cli/format/c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python/qmk/cli/format') diff --git a/lib/python/qmk/cli/format/c.py b/lib/python/qmk/cli/format/c.py index 0160e6036f..568684ed56 100644 --- a/lib/python/qmk/cli/format/c.py +++ b/lib/python/qmk/cli/format/c.py @@ -74,7 +74,7 @@ def filter_files(files, core_only=False): # 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(i in str(file) for i in core_dirs) or any(i in str(file) for i in ignored): + if not any(str(file).startswith(i) for i in core_dirs) or any(str(file).startswith(i) for i in ignored): files[index] = None cli.log.debug("Skipping non-core file %s, as '--core-only' is used.", file) -- cgit v1.2.1