From c92d09b4a499a05533c545ab992ac70d33c520ae Mon Sep 17 00:00:00 2001 From: Vivek Jain Date: Fri, 18 Mar 2016 01:25:41 +0530 Subject: [PATCH] XMLBear: Process error correctly Errors were shown as logs instead of errors. Corrected the processing of output to show the error messages. Fixes https://github.com/coala-analyzer/coala-bears/issues/251 --- bears/xml/XMLBear.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bears/xml/XMLBear.py b/bears/xml/XMLBear.py index ba27622d5e..07aa0db00f 100644 --- a/bears/xml/XMLBear.py +++ b/bears/xml/XMLBear.py @@ -22,12 +22,13 @@ class XMLBear(LocalBear, Lint): diff_message = "XML can be formatted better." output_regex = r'(.*\.xml):(?P\d+): (?P.*)\n.*\n.*' gives_corrected = True + use_stderr = True def process_output(self, output, filename, file): + if self.stderr_output: + return self._process_issues(self.stderr_output, filename) if self.stdout_output: # only yield Result if stdout is not empty return self._process_corrected(self.stdout_output, filename, file) - if self.stderr_output: # pragma: no cover - return self._process_issues(self.stderr_output, filename) def run(self, filename, file, xml_schema: path="",