Skip to content

Commit 29b4d07

Browse files
authored
Merge pull request #31 from SublimeLinter/sl4-cleanup
use selector, clean up old messages and comments
2 parents af586e5 + 905a7ea commit 29b4d07

6 files changed

Lines changed: 11 additions & 59 deletions

File tree

README.md

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,23 @@ SublimeLinter-phpcs
33

44
[![Build Status](https://travis-ci.org/SublimeLinter/SublimeLinter-phpcs.svg?branch=master)](https://travis-ci.org/SublimeLinter/SublimeLinter-phpcs)
55

6-
This linter plugin for [SublimeLinter](http://sublimelinter.readthedocs.org/) provides an interface to [phpcs](http://pear.php.net/package/PHP_CodeSniffer/). It will be used with files that have the “PHP”, “HTML” and “HTML5” syntax.
6+
This linter plugin for [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter) provides an interface to [phpcs](http://pear.php.net/package/PHP_CodeSniffer/).
7+
It will be used with files that have the "PHP", "HTML" and "HTML5" syntax.
8+
79

810
## Installation
11+
912
SublimeLinter must be installed in order to use this plugin.
1013

1114
Please use [Package Control](https://packagecontrol.io) to install the linter plugin.
1215

13-
Before using this plugin, you must ensure that `phpcs` is installed on your system, preferably somewhere in your PATH. To install `phpcs`, follow the instructions on https://github.com/squizlabs/PHP_CodeSniffer#installation.
16+
Before using this plugin, ensure that `phpcs` is installed on your system, preferably somewhere in your PATH. To install `phpcs`, follow the instructions on https://github.com/squizlabs/PHP_CodeSniffer#installation.
1417

15-
## Settings
16-
- SublimeLinter settings: http://sublimelinter.readthedocs.org/en/latest/settings.html
17-
- Linter settings: http://sublimelinter.readthedocs.org/en/latest/linter_settings.html
1818

19-
### Project Specific Executable
20-
It is possible to specify the `phpcs` executable that should be used to lint your code on a per-project level.
19+
## Settings
2120

22-
**Example:**
23-
```json
24-
{
25-
"SublimeLinter": {
26-
"linters": {
27-
"phpcs": {
28-
"cmd": "${folder}/vendor/bin/phpcs"
29-
}
30-
}
31-
}
32-
}
33-
```
21+
- SublimeLinter settings: http://sublimelinter.com/en/latest/settings.html
22+
- Linter settings: http://sublimelinter.com/en/latest/linter_settings.html
3423

3524
### Per-project Standards
3625
You can set up your project settings to use a specific standard using the following:

linter.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
1-
#
2-
# linter.py
3-
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
4-
#
5-
# Written by Dmitry Tsoy
6-
# Copyright (c) 2013 Dmitry Tsoy
7-
#
8-
# License: MIT
9-
#
10-
111
from SublimeLinter.lint import Linter, util
122

133

144
class Phpcs(Linter):
15-
syntax = ('php', 'html', 'html 5')
165
cmd = ('phpcs', '--report=emacs', '${args}', '-')
176
regex = r'^.*:(?P<line>[0-9]+):(?P<col>[0-9]+): (?:(?P<error>error)|(?P<warning>warning)) - (?P<message>.+)'
187
defaults = {
8+
'selector': 'source.php, text.html.basic',
199
# we want auto-substitution of the filename, but `cmd` does not support that yet
2010
'--stdin-path=': '${file}',
2111
'--standard=': 'PSR2',

messages.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"install": "messages/install.txt",
3-
"1.1.0": "messages/1.1.0.txt",
4-
"2.0.0": "messages/2.0.0.txt"
2+
"install": "messages/install.txt"
53
}

messages/1.1.0.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

messages/2.0.0.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

messages/install.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ SublimeLinter-phpcs
22
-------------------------------
33
This linter plugin for SublimeLinter provides an interface to phpcs.
44

5-
INSTALLATION
6-
------------
7-
Before this plugin will activate, you *must* follow the installation
8-
instructions here:
5+
Please read the installation instructions at:
96

107
https://github.com/SublimeLinter/SublimeLinter-phpcs

0 commit comments

Comments
 (0)