Skip to content

Commit bdf8c69

Browse files
authored
Merge pull request #32 from sptndc/get-phpcs-binary-from-composer
Get phpcs binary
2 parents 6972dce + 7bd85db commit bdf8c69

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

linter.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
from SublimeLinter.lint import Linter, util
1+
#
2+
# linter.py
3+
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
4+
#
5+
# License: MIT
6+
#
27

8+
from SublimeLinter.lint import ComposerLinter, util
39

4-
class Phpcs(Linter):
10+
11+
class Phpcs(ComposerLinter):
512
cmd = ('phpcs', '--report=emacs', '${args}', '-')
613
regex = r'^.*:(?P<line>[0-9]+):(?P<col>[0-9]+): (?:(?P<error>error)|(?P<warning>warning)) - (?P<message>.+)'
14+
composer_name = 'phpcs'
715
defaults = {
816
'selector': 'source.php, text.html.basic',
917
# we want auto-substitution of the filename, but `cmd` does not support that yet

0 commit comments

Comments
 (0)