Skip to content

Commit

Permalink
The "dodgy" tool did not correctly work with the new file finder
Browse files Browse the repository at this point in the history
  • Loading branch information
carlio committed Sep 26, 2014
1 parent 6d6c38b commit 66d9d1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prospector/__pkginfo__.py
@@ -1,5 +1,5 @@

VERSION = (0, 6, 2)
VERSION = (0, 6, 3)

def get_version():
return '.'.join([str(v) for v in VERSION])
10 changes: 8 additions & 2 deletions prospector/tools/dodgy/__init__.py
Expand Up @@ -25,12 +25,18 @@ def run(self):
mimetype = mimetypes.guess_type(filepath)
if mimetype[0] is None or not mimetype[0].startswith('text/'):
continue
warnings += check_file(filepath)
for line, code, message in check_file(filepath):
warnings.append({
'line': line, 'code': code, 'message': message,
'path': filepath
})
print

messages = []
for warning in warnings:
path = warning['path']
loc = Location(path, module_from_path(path), '', warning['line'], 0, absolute_path=False)
prefix = os.path.commonprefix([self._files.rootpath, path])
loc = Location(path, module_from_path(path[len(prefix):]), '', warning['line'], 0, absolute_path=True)
msg = Message('dodgy', warning['code'], loc, warning['message'])
messages.append(msg)

Expand Down

0 comments on commit 66d9d1c

Please sign in to comment.