Skip to content

Commit

Permalink
Merge pull request #32 from sptndc/get-phpcs-binary-from-composer
Browse files Browse the repository at this point in the history
Get phpcs binary
  • Loading branch information
kaste authored Apr 19, 2018
2 parents 6972dce + 7bd85db commit bdf8c69
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions linter.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
from SublimeLinter.lint import Linter, util
#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# License: MIT
#

from SublimeLinter.lint import ComposerLinter, util

class Phpcs(Linter):

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

0 comments on commit bdf8c69

Please sign in to comment.