Created
August 26, 2020 01:05
-
-
Save kapitanluffy/2d3b17bb6daabb884012739c9fc3e81e to your computer and use it in GitHub Desktop.
Revisions
-
kapitanluffy created this gist
Aug 26, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,57 @@ { "debug": true, "delay": 0.5, "linters": { // basically, this is just what you need in enabling a linter "php": { "disable": false }, "phpcs": { "args": [ // specify the standards you want phpcs to check "--standard=PSR1,PSR2,PSR12" ], "disable": false, "excludes": [], // lint only on save because this shit is slow sometimes "lint_mode": "save" }, "phpmd": { "args": [], // ruleset ignoring some annoying rules "rulesets": "D://~/bin/phpmd/legacy-ruleset.xml", "disable": false, "excludes": [], // lint only on save because this shit is slow sometimes "lint_mode": "save" }, "phpstan": { "working_dir": "${folder:$file_path}", "disable": false, "args": [ "--memory-limit=2048M" ], "excludes": [] }, "phplint": { "disable": true, "args": [], "excludes": [] }, }, "paths": { "linux": [], "osx": [], "windows": [ // add here the paths pointing to each linter executable "D://~/bin/php", "D://~/bin/phpcs", "D://~/bin/phpmd/vendor/bin", "D://~/bin/phpstan", "D://~/bin/phplint", ] }, // you can enable this but i currently prefer LSP's error panel showing up "show_panel_on_save": "never", "lint_mode": "background" } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ Install this in a separate directory: - https://github.com/phpstan/phpstan - https://github.com/phpmd/phpmd - https://github.com/squizlabs/PHP_CodeSniffer You can either use composer or downloading the phar file. I prefer composer since I can update it easily w/o redownloading the phar..