Hi,
I’m getting confused with the new SublimeLinter version. As sublimelinter phpcs is now depreceated, how can we setup SL to properly use wpcs linter. The doc talks about a per project, in the plugin settings? If someone have a clue or an exemple to link to, you’re most welcome.
How to setup Sublimelinter 4 with phpcs properly
FxBe
#1
0 Likes
willrowe
#4
Ok, I misunderstood what you were referring to.
The SublimeLinter-phpcs plugin has instructions for setting the path to the phpcs
executable and standards files.
0 Likes
migli
#5
Hi,
I work with Sublime Linter and several addons: phpcs, phpcbf, phpcsfixer, phpmd, …
Here’s a config sample:
"linters": {
"php": {
"@disable": false,
"args": [],
"excludes": []
},
"phpcbf": {
"@disable": false,
"args": [],
"cmd": "C:/Users/[USER]/AppData/Roaming/Composer/vendor/bin/phpcbf.bat",
"excludes": []
},
"phpcs": {
"@disable": false,
"args": [],
"excludes": [],
"ignore_match": [
"Line exceeds",
"A file should declare"
],
"standard": "PSR2"
},
"phpcsfixer": {
"@disable": false,
"args": [],
"excludes": []
},
"phpmd": {
"@disable": false,
"args": [
"--minimumpriority",
"2"
],
"excludes": [],
"rulesets": "cleancode,codesize,controversial,design,naming,unusedcode"
}
},
"paths": {
"linux": [],
"osx": [],
"windows": [
"C:/Ampps/php-7.1",
"C:/Users/[USER]/AppData/Roaming/Composer/vendor/bin/"
]
}
If you install phpcs globally with Composer and adapt the paths to yours it should work fine.
The other tools (phpcsfixer, …) can be installed the same way.
0 Likes