Skip to content

Commit

Permalink
Tweaks for gometalinter
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehoban committed Jul 23, 2016
1 parent 3c7c3df commit 9eba496
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This extension adds rich language support for the Go language to VS Code, includ
- Workspace symbol search (using `go-symbols`)
- Rename (using `gorename`)
- Build-on-save (using `go build` and `go test`)
- Lint-on-save (using `golint` or `gometalinter`)
- Format (using `goreturns` or `goimports` or `gofmt`)
- Add Imports (using `gopkgs`)
- [_partially implemented_] Debugging (using `delve`)
Expand Down
5 changes: 3 additions & 2 deletions src/goCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function runTool(cmd: string, args: string[], cwd: string, severity: string, use
ret[ret.length - 1].msg += '\n' + lines[i];
continue;
}
let match = /^([^:]*: )?((.:)?[^:]*):(\d+)(:(\d+))?:(?:\w+:)? (.*)$/.exec(lines[i]);
let match = /^([^:]*: )?((.:)?[^:]*):(\d+)(:(\d+)?)?:(?:\w+:)? (.*)$/.exec(lines[i]);
if (!match) continue;
let [_, __, file, ___, lineStr, ____, charStr, msg] = match;
let line = +lineStr;
Expand Down Expand Up @@ -98,7 +98,8 @@ export function check(filename: string, goConfig: vscode.WorkspaceConfiguration)
cwd,
'warning',
lintTool === 'golint',
'golint'
lintTool === 'golint' ? 'golint' : null,
lintTool === 'golint' ? undefined : 'No "gometalinter" could be found. Install gometalinter to use this option.'
));
}

Expand Down

0 comments on commit 9eba496

Please sign in to comment.