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
This commit is contained in:
Andreas Jaeger 2020-04-04 17:25:49 +02:00
parent 7e2ab23d90
commit 55e31dd996

View File

@ -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(