gopkg.in/alecthomas/gometalinter.v3@v3.0.0/regressiontests/gofmt_test.go (about)

     1  package regressiontests
     2  
     3  import "testing"
     4  
     5  func TestGofmt(t *testing.T) {
     6  	t.Parallel()
     7  	source := `
     8  package test
     9  func test() { if nil {} }
    10  `
    11  	expected := Issues{
    12  		{Linter: "gofmt", Severity: "warning", Path: "test.go", Line: 1, Col: 0, Message: "file is not gofmted with -s"},
    13  	}
    14  	ExpectIssues(t, "gofmt", source, expected)
    15  }