Skip to content

Commit

Permalink
Merge pull request #31 from SublimeLinter/bug/errorsForCurrentFile
Browse files Browse the repository at this point in the history
Only show errors for the current file. Closes #29
  • Loading branch information
ckaznocha committed Apr 1, 2016
2 parents a5c03a5 + 756e366 commit 6b681b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def _error_to_tuple(self, error):
Which means we can mostly avoid dealing with regex parsing since the
flow devs have already done that for us. Thanks flow devs!
"""
fake_match = True
error_messages = error.get('message', [])
match = self.filename == error_messages[0]['path']
# TODO(nsfmc): `line_col_base` won't work b/c we avoid `split_match`'s codepath
line = error_messages[0]['line'] - 1
col = error_messages[0]['start'] - 1
Expand All @@ -88,7 +88,7 @@ def _error_to_tuple(self, error):
persist.debug('flow line: {}, col: {}, level: {}, message: {}'.format(
line, col, level, combined_message))

return (fake_match, line, col, is_error, is_warning, combined_message, near)
return (match, line, col, is_error, is_warning, combined_message, near)

def find_errors(self, output):
"""
Expand Down

0 comments on commit 6b681b0

Please sign in to comment.