Skip to content

Commit

Permalink
Merge pull request #37 from SublimeLinter/fixup-splitmatch
Browse files Browse the repository at this point in the history
Must return `None` to skip a match
  • Loading branch information
kaste committed Apr 18, 2019
2 parents bbd4d19 + 16f4d03 commit 6760c87
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ def split_match(self, match):
match, line, col, error, warning, message, near = super().split_match(match)

if message == 'no PHP code found at all':
match = None
else:
message = message.replace('`', '\'')
return None

# If the message contains a complaint about a function
# and near looks like a function reference, remove the trailing
# () so it can be found.
if 'function \'' in message and near and near.endswith('()'):
near = near[:-2]
message = message.replace('`', '\'')

# If the message contains a complaint about a function
# and near looks like a function reference, remove the trailing
# () so it can be found.
if 'function \'' in message and near and near.endswith('()'):
near = near[:-2]

return match, line, col, error, warning, message, near

0 comments on commit 6760c87

Please sign in to comment.