SublimeLinter / SublimeLinter-php

SublimeLinter 3 plugin for PHP, using php -l.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

semi-colon highlighting wrong section.

ctf0 opened this issue · comments

commented

many many thanx for all ur work ,
currently when i have a missing semi-colon ,the next line of code gets highlighted like
ss

i dont know if this is intended or is it a bug , but any other error the linter highlight the current line which is the expected.

What is the console output of of the linter on this file? Most likely the output ends with something like - on line 9, which is why the linter incorrectly points to that line. That is a problem of the parser in php, not SublimeLinter. In that case, it is intended results, though I understand the frustration of that.

commented

here is the console

SublimeLinter: php: PostController.php ['/usr/local/bin/php', '-l', '-n', '-d', 'display_errors=On', '-d', 'log_errors=Off'] 
SublimeLinter: php output:

Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting ',' or ';' in - on line 9
Errors parsing - 

yeah i thought that too because the linter of JS is working as expected.

Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting ',' or ';' in - on line 9

Yeah, as expected, it's a limitation of the php parser not SL.

Thanks!