*: Fix go vet complaints (#1935)

* *: Fix go vet struct complaints

* *: Fix struct vet issue on linux

* *: Ignore proc/native in go vet check

We have to do some unsafe pointer manipulation that will never make go
vet happy within the proc/native package. Ignore it for runs of go vet.
This commit is contained in:
Derek Parker
2020-03-18 09:25:32 -07:00
committed by GitHub
parent edc5436fe3
commit ad75f78c4e
27 changed files with 166 additions and 136 deletions

View File

@ -245,7 +245,9 @@ func TestExecuteFile(t *testing.T) {
func TestIssue354(t *testing.T) {
printStack([]api.Stackframe{}, "", false)
printStack([]api.Stackframe{{api.Location{PC: 0, File: "irrelevant.go", Line: 10, Function: nil}, nil, nil, 0, 0, nil, true, ""}}, "", false)
printStack([]api.Stackframe{
{Location: api.Location{PC: 0, File: "irrelevant.go", Line: 10, Function: nil},
Bottom: true}}, "", false)
}
func TestIssue411(t *testing.T) {
@ -778,7 +780,7 @@ func TestConfig(t *testing.T) {
if err != nil {
t.Fatalf("error executing configureCmd(substitute-path a b): %v", err)
}
if len(term.conf.SubstitutePath) != 1 || (term.conf.SubstitutePath[0] != config.SubstitutePathRule{"a", "b"}) {
if len(term.conf.SubstitutePath) != 1 || (term.conf.SubstitutePath[0] != config.SubstitutePathRule{From: "a", To: "b"}) {
t.Fatalf("unexpected SubstitutePathRules after insert %v", term.conf.SubstitutePath)
}
@ -884,7 +886,7 @@ func TestPrintContextParkedGoroutine(t *testing.T) {
func TestStepOutReturn(t *testing.T) {
ver, _ := goversion.Parse(runtime.Version())
if ver.Major >= 0 && !ver.AfterOrEqual(goversion.GoVersion{1, 10, -1, 0, 0, ""}) {
if ver.Major >= 0 && !ver.AfterOrEqual(goversion.GoVersion{Major: 1, Minor: 10, Rev: -1}) {
t.Skip("return variables aren't marked on 1.9 or earlier")
}
withTestTerminal("stepoutret", t, func(term *FakeTerminal) {