Skip to content

Commit

Permalink
Updates to fix Travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehoban committed Aug 16, 2016
1 parent 6070753 commit b8c7db7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ install:
- go get -u -v github.com/newhook/go-symbols
- go get -u -v golang.org/x/tools/cmd/guru
- go get -u -v github.com/alecthomas/gometalinter
- gometalinter --install --update
- GO15VENDOREXPERIMENT=1 gometalinter --install

script:
- npm run lint
Expand Down
12 changes: 6 additions & 6 deletions src/debugAdapter/goDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,17 @@ class Delve {
let str = chunk.toString();
if (this.onstderr) { this.onstderr(str); }
if (!serverRunning) {
serverRunning = true;
connectClient(port, host);
}
serverRunning = true;
connectClient(port, host);
}
});
this.debugProcess.stdout.on('data', chunk => {
let str = chunk.toString();
if (this.onstdout) { this.onstdout(str); }
if (!serverRunning) {
serverRunning = true;
connectClient(port, host);
}
serverRunning = true;
connectClient(port, host);
}
});
this.debugProcess.on('close', function(code) {
// TODO: Report `dlv` crash to user.
Expand Down
8 changes: 5 additions & 3 deletions test/go.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,15 @@ suite('Go Extension Tests', () => {
config['lintTool'] = 'gometalinter';
let expected = [
{ line: 7, severity: 'warning', msg: 'Print2 is unused (deadcode)' },
{ line: 11, severity: 'warning', msg: 'error return value not checked (undeclared name: prin) (errcheck)' },
{ line: 7, severity: 'warning', msg: 'exported function Print2 should have comment or be unexported (golint)' },
{ line: 10, severity: 'warning', msg: 'main2 is unused (deadcode)' },
{ line: 11, severity: 'warning', msg: 'undeclared name: prin (aligncheck)' },
{ line: 11, severity: 'warning', msg: 'undeclared name: prin (gotype)' },
{ line: 11, severity: 'warning', msg: 'undeclared name: prin (interfacer)' },
{ line: 11, severity: 'warning', msg: 'undeclared name: prin (unconvert)' },
{ line: 11, severity: 'error', msg: 'undefined: prin' },
{ line: 11, severity: 'warning', msg: 'unused global variable undeclared name: prin (varcheck)' },
{ line: 11, severity: 'warning', msg: 'unused struct field undeclared name: prin (structcheck)' },
];
check(path.join(fixturePath, 'errors.go'), config).then(diagnostics => {
Expand All @@ -140,9 +142,9 @@ suite('Go Extension Tests', () => {
return 0;
});
for (let i in expected) {
assert.equal(sortedDiagnostics[i].line, expected[i].line);
assert.equal(sortedDiagnostics[i].severity, expected[i].severity);
assert.equal(sortedDiagnostics[i].msg, expected[i].msg);
assert.equal(sortedDiagnostics[i].line, expected[i].line, `Failed to match expected error #${i}: ${JSON.stringify(sortedDiagnostics)}`);
assert.equal(sortedDiagnostics[i].severity, expected[i].severity, `Failed to match expected error #${i}: ${JSON.stringify(sortedDiagnostics)}`);
assert.equal(sortedDiagnostics[i].msg, expected[i].msg, `Failed to match expected error #${i}: ${JSON.stringify(sortedDiagnostics)}`);
}
assert.equal(sortedDiagnostics.length, expected.length, `too many errors ${JSON.stringify(sortedDiagnostics)}`);
}).then(() => done(), done);
Expand Down

0 comments on commit b8c7db7

Please sign in to comment.