Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue with Frosted tool not handling ignores correctly. #28

Merged
merged 1 commit into from
Jun 10, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion prospector/tools/frosted/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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)
Expand Down