@@ -277,12 +277,13 @@ func TestGolangciLint(t *testing.T) {
277277 // Test "make gometalinter"
278278 v , err := exec .Command ("make" , "golangci-lint" ).Output ()
279279 a .Error (err ) // Should complain about pretty much everything in the dirtyComplex package.
280- a .Contains (string (v ), "don't use MixedCaps in package name; dirtyComplex should be dirtycomplex" )
281- a .Contains (string (v ), "don't use underscores in Go names; func DummyExported_function should be DummyExportedFunction (golint)" )
282- a .Contains (string (v ), "File is not gofmt-ed with -s (gofmt)" )
283- a .Contains (string (v ), "ineffectual assignment to `num` (ineffassign)" )
284- a .Contains (string (v ), "yetAnotherExportedFunction` is unused (deadcode)" )
285- a .Contains (string (v ), "Error return value of `os.Chown` is not checked (errcheck)" )
280+ execResult := string (v )
281+ a .Contains (execResult , "don't use MixedCaps in package name; dirtyComplex should be dirtycomplex" )
282+ a .Contains (execResult , "don't use underscores in Go names; func DummyExported_function should be DummyExportedFunction (golint)" )
283+ a .Contains (execResult , "File is not `gofmt`-ed with `-s`" )
284+ a .Contains (execResult , "ineffectual assignment to `num` (ineffassign)" )
285+ a .Contains (execResult , "yetAnotherExportedFunction` is unused (deadcode)" )
286+ a .Contains (execResult , "Error return value of `os.Chown` is not checked (errcheck)" )
286287
287288 out , err := exec .Command ("make" , "golangci-lint" , "SRC_DIRS=pkg/clean" ).Output ()
288289 a .NoError (err , "Failed to get clean result for golangci-lint: %v (output=%s)" , err , out ) // Should have no complaints in clean package
0 commit comments