Skip to content

Commit

Permalink
Fix 'File ignored' catching
Browse files Browse the repository at this point in the history
The message eslint yields changed, so it didn't match our pattern
anymore.
  • Loading branch information
kaste committed Feb 17, 2018
1 parent 0962de3 commit e63574d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,12 @@ def find_errors(self, output):
return super().find_errors(output)

def split_match(self, match):
"""
Extract and return values from match.
"""Extract and return values from match.
We override this method to silent warning by .eslintignore settings.
Return 'no match' for ignored files
"""
v1message = 'File ignored because of your .eslintignore file. Use --no-ignore to override.'
v2message = 'File ignored because of a matching ignore pattern. Use --no-ignore to override.'

match, line, col, error, warning, message, near = super().split_match(match)
if message and (message == v1message or message == v2message):
if message and message.startswith('File ignored'):
return match, None, None, None, None, '', None

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

0 comments on commit e63574d

Please sign in to comment.