SublimeLinter-contrib-htmlhint
SublimeLinter-contrib-htmlhint copied to clipboard
Crashes with PHP files
I am having a problem with the linter. It seems to crash with PHP files when there is PHP code in the files. Here is the latest error that I got.
`SublimeLinter: #59 htmlhint routes.php ERROR:
Linter crashed.
Traceback (most recent call last): File "lint.backend in /Users/AlexBet/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter.sublime-package", line 100, in execute_lint_task File "lint.linter in /Users/AlexBet/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter.sublime-package", line 777, in lint File "linter in /Users/AlexBet/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter-contrib-htmlhint.sublime-package", line 38, in find_errors File "/Applications/Sublime Text.app/Contents/MacOS/sublime.py", line 215, in decode_value raise ValueError(err) ValueError: Error trying to decode value: Unexpected character, expected a comma or closing bracket in (data):1:65538`
This happened when I opened a PHP file which has all PHP code, no HTML code at all.
与php语法的 <p? ?>发生兼容性问题,会提示错误
`Traceback (most recent call last):
File "/Users/user/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter.sublime-package/lint/backend.py", line 155, in execute_lint_task
errors = linter.lint(code, view_has_changed)
File "/Users/user/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter.sublime-package/lint/linter.py", line 1138, in lint
return self.filter_errors(self.parse_output(output, virtual_view))
File "/Users/user/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter.sublime-package/lint/linter.py", line 1164, in filter_errors
for error in errors
File "/Users/user/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter.sublime-package/lint/linter.py", line 1163, in <listcomp>
error
File "/Users/user/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter.sublime-package/lint/linter.py", line 1204, in parse_output_via_regex
for m in self.find_errors(output):
File "/Users/user/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter-contrib-htmlhint.sublime-package/linter.py", line 36, in find_errors
output_json = sublime.decode_value(output)
File "/Applications/Sublime Text.app/Contents/MacOS/sublime.py", line 215, in decode_value
raise ValueError(err)
ValueError: Error trying to decode value: Expected value in (data):1:64377`
Do the trick in #20 to fix this issue.