From ec4fa4c199a79769fd0a043e185d08bc83f48958 Mon Sep 17 00:00:00 2001 From: William Ballenthin Date: Mon, 6 Jul 2020 14:06:37 -0600 Subject: [PATCH] main: don't log expected non-rule files --- capa/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capa/main.py b/capa/main.py index c883786a..503f5f09 100644 --- a/capa/main.py +++ b/capa/main.py @@ -307,7 +307,10 @@ def get_rules(rule_path): for root, dirs, files in os.walk(rule_path): for file in files: if not file.endswith(".yml"): - logger.warning("skipping non-.yml file: %s", file) + if not (file.endswith(".md") or file.endswith(".git")): + # expect to see readme.md, format.md, and maybe a .git directory + # other things maybe are rules, but are mis-named. + logger.warning("skipping non-.yml file: %s", file) continue rule_path = os.path.join(root, file)