From 27e3bbf4b4067b9fa178fc1f3f30af0fff412462 Mon Sep 17 00:00:00 2001 From: Jason Simeone Date: Mon, 9 Jun 2014 14:38:55 -0400 Subject: [PATCH] Fixed issue with Frosted tool not handling ignores correctly. --- prospector/tools/frosted/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/prospector/tools/frosted/__init__.py b/prospector/tools/frosted/__init__.py index 3e8cd1cf..caf8f714 100644 --- a/prospector/tools/frosted/__init__.py +++ b/prospector/tools/frosted/__init__.py @@ -1,5 +1,7 @@ from __future__ import absolute_import +import os.path + from frosted.api import iter_source_code, check_path from prospector.message import Location, Message @@ -74,6 +76,7 @@ def __init__(self, *args, **kwargs): def prepare(self, rootpath, ignore, args, adaptors): self._paths = [rootpath] + self._rootpath = rootpath self._ignores = ignore for adaptor in adaptors: @@ -83,7 +86,8 @@ def run(self): reporter = ProspectorReporter(ignore=self.ignore_codes) for filepath in iter_source_code(self._paths): - if any([ip.search(filepath) for ip in self._ignores]): + relpath = os.path.relpath(filepath, self._rootpath) + if any([ip.search(relpath) for ip in self._ignores]): continue check_path(filepath, reporter)