Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(VS Code Extension) - Ignore spurious message in ghcid.txt #386

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Requires [`ghcid`](https://github.com/ndmitchell/ghcid) to be installed and on y
## Local installation

Run:

npm update
npm install
npm install -g vsce
rm haskell-ghcid-*.vsix
rm haskell-ghcid-*.vsix # optional
vsce package
code --install-extension haskell-ghcid-*.vsix

Expand Down
2 changes: 1 addition & 1 deletion plugins/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "haskell-ghcid",
"displayName": "haskell-ghcid",
"description": "Integrate ghcid into VS Code",
"version": "0.3.1",
"version": "0.3.2",
"publisher": "ndmitchell",
"homepage": "https://github.com/ndmitchell/ghcid",
"author": "Neil Mitchell, Chris Wendt",
Expand Down
4 changes: 2 additions & 2 deletions plugins/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function parseGhcidOutput(dir : string, s : string) : [vscode.Uri, vscode
const newlines: string[] = []
for (const line of lines) {
if (/In the/.test(line)) break

if (/Ghcid has stopped./.test(line)) break
if (line.match(/\s*\|$/)) break
if (line.match(/(\d+)?\s*\|/)) break

Expand Down Expand Up @@ -76,7 +76,7 @@ export function parseGhcidOutput(dir : string, s : string) : [vscode.Uri, vscode
let msg = [].concat(/^\s*$/.test(s) ? [] : [s], xs.slice(1));
return [pair(file, new vscode.Diagnostic(range, dedent(msg).join('\n'), sev))];
};
if (xs[0].startsWith("All good"))
if (! xs || xs.length === 0 || xs[0].startsWith("All good"))
return [];
if (m = xs[0].match(r1))
return f(2,3,2,3);
Expand Down