Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 0cbdd33

Browse files
committed
Print stderr to console and don't add it to linter output. Resolves #474
1 parent 9ee11c9 commit 0cbdd33

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

server/src/linters/BaseLinter.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,20 @@ export default abstract class BaseLinter implements ILinter {
4949
env: this.config.env,
5050
cwd: this.config.executionRoot,
5151
stdin: of(this.document.getText()),
52+
split: true,
5253
}).pipe(
5354
catchError(error => {
5455
this.processError(error);
5556
return empty();
5657
}),
57-
reduce((acc: string, value: string) => acc + value, ''),
58+
reduce((acc: string, value: any) => {
59+
if (value.source === 'stdout') {
60+
return acc + value.text;
61+
} else {
62+
console.error(value.text);
63+
return acc;
64+
}
65+
}, ''),
5866
map((result: string) => this.processResults(result))
5967
);
6068
}

0 commit comments

Comments
 (0)