github.com/gwaycc/gometalinter@v3.0.0+incompatible/regressiontests/structcheck_test.go (about) 1 package regressiontests 2 3 import "testing" 4 5 func TestStructcheck(t *testing.T) { 6 t.Parallel() 7 source := `package test 8 9 type test struct { 10 unused int 11 } 12 ` 13 expected := Issues{ 14 {Linter: "structcheck", Severity: "warning", Path: "test.go", Line: 4, Col: 2, Message: "unused struct field github.com/alecthomas/gometalinter/regressiontests/.test.unused"}, 15 } 16 ExpectIssues(t, "structcheck", source, expected) 17 }