Strip source dir from file comments
Some programs like sphinx emit absolute paths in error messages. Those cannot be processed by zuul so filter them if they're part of zuul.project. Change-Id: Ie8af91017c26f39c3aa9ca098d4230f0688351ce
This commit is contained in:
parent
ecb2c55640
commit
7df5e55ebc
@ -105,6 +105,12 @@ def extract_file_comments(tox_output, tox_envlist):
|
||||
# Don't report if the file path isn't valid
|
||||
if not os.path.isfile(file_path):
|
||||
continue
|
||||
|
||||
# Strip current working dir to make absolute paths relative
|
||||
cwd = os.getcwd() + '/'
|
||||
if file_path.startswith(cwd):
|
||||
file_path = file_path[len(cwd):]
|
||||
|
||||
ret.setdefault(file_path, [])
|
||||
if tox_envlist:
|
||||
message = "{envlist}: {message}".format(
|
||||
|
Loading…
x
Reference in New Issue
Block a user