mirror of
https://github.com/sstent/sublime-text-3.git
synced 2026-01-26 15:11:55 +00:00
backing up sublime settings
This commit is contained in:
14
Packages/User/linters/php.py
Normal file
14
Packages/User/linters/php.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from lint import Linter
|
||||
|
||||
class PHP(Linter):
|
||||
language = ('php', 'html')
|
||||
cmd = ('php', '-l', '-n', '-d display_errors=On')
|
||||
regex = r'^Parse error:\s*(?P<type>parse|syntax) error,?\s*(?P<error>.+?)?\s+in\s+.+?\s*line\s+(?P<line>\d+)'
|
||||
|
||||
def match_error(self, r, line):
|
||||
match, row, col, error, near = super().match_error(r, line)
|
||||
|
||||
if match and match.group('type') == 'parse' and not error:
|
||||
error = 'parse error'
|
||||
|
||||
return match, row, col, error, near
|
||||
Reference in New Issue
Block a user