SublimeLinter-phpcs icon indicating copy to clipboard operation
SublimeLinter-phpcs copied to clipboard

Better error handling

Open kaste opened this issue 7 years ago • 3 comments

Adopt the following code

https://github.com/ikappas/vscode-phpcs/blob/5ec0314d0187f8cedd004a453b6859ff948664bd/phpcs-server/src/linter.ts#L187-L206

Since stderr is always an error, we can switch to STREAM_BOTH mode (which is the default) and will get some automatic handling for SL >4.3

Parsing fatal errors within stdin, is marked 'needs help'

kaste avatar Apr 19 '18 11:04 kaste

Basically the implementation could be

def find_errors(self, stdout):
	if SOME_ERROR_REGEX.matches(stdout):
		logger.warning('Dada')
		self.notify_failure()
		return
	return super().find_errors(stdout)

But you need to write the regexes and test this, I don't have phpcs installed. 😢

kaste avatar Apr 19 '18 11:04 kaste

any updates from this?

skeeith avatar Oct 16 '22 02:10 skeeith

Na, you can implement this, @skeeith.

kaste avatar Oct 16 '22 13:10 kaste