From 55e31dd996f485f6c5e5e2649ad2384ace18d175 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 4 Apr 2020 17:25:49 +0200 Subject: [PATCH] tox-parse_output: Ignore .tox directory We get many false positives on the .tox directory, ignore it. Even better would be to only handle files under version control but that is more involved, so use the simple heuristic for .tox for now since that catches 90+ per cent of the cases. Change-Id: Ibb17958454a4d6bf156020fe4d9f588f3c666cc7 --- roles/tox/library/tox_parse_output.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/tox/library/tox_parse_output.py b/roles/tox/library/tox_parse_output.py index cbae7e0a9..b2532ac90 100644 --- a/roles/tox/library/tox_parse_output.py +++ b/roles/tox/library/tox_parse_output.py @@ -117,6 +117,11 @@ def extract_file_comments(tox_output, workdir, tox_envlist=None): if file_path.startswith('/'): continue + # We should only handle files that are in under version control. + # For now, skip .tox directory, we can enhance later. + if file_path.startswith('.tox'): + continue + ret.setdefault(file_path, []) if tox_envlist: message = "{envlist}: {message}".format(