Code Lover
Code Lover

Reputation: 8348

Sublime Text 3 Linter not working

I am trying to establish SublimeLinter for SL3 but it is not working no matter what settings I do.

Here what I am having in user config file

{
    "sublimelinter": true,
    "sublimelinter_executable_map":
    {
        "php": "C:\\xampp\\php\\php.exe"
    },
}

No live error checking or no error checking on file save.

Upvotes: 0

Views: 2104

Answers (3)

elgsantos
elgsantos

Reputation: 2033

I made it work this way (Sublime Text 3):

  1. Go to Preferences > Package Settings > Sublime Linter > Settings
  2. Add this code with your php.exe path

// SublimeLinter Settings - User
{
    "paths": {
        "windows": ["C:\\wamp\\bin\\php\\php7.2.14"]
    }
}

For example if you're using wamp with php7.2.14

Take a look at the documentation site

Upvotes: 1

MattDMo
MattDMo

Reputation: 102852

The new version of SublimeLinter3 requires both the base SublimeLinter package (which you have), and a language-specific linter package (which you may not have installed). There are several ones for PHP, it looks like the most popular currently is SublimeLinter-php, which uses php -l for linting. Install the plugin you want via Package Control, restart Sublime just for fun, and you should now be able to lint your PHP code.

Upvotes: 1

bdf
bdf

Reputation: 247

Check Preferences > Settings - User. It could be in your list of ignored packages.

Upvotes: 0

Related Questions