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

     1  package regressiontests
     2  
     3  import "testing"
     4  
     5  func TestMisSpell(t *testing.T) {
     6  	t.Parallel()
     7  	source := `package test
     8  // The langauge is incorrect.
     9  var a = "langauge"
    10  `
    11  	expected := Issues{
    12  		{Linter: "misspell", Severity: "warning", Path: "test.go", Line: 2, Col: 7, Message: "\"langauge\" is a misspelling of \"language\""},
    13  		{Linter: "misspell", Severity: "warning", Path: "test.go", Line: 3, Col: 9, Message: "\"langauge\" is a misspelling of \"language\""},
    14  	}
    15  	ExpectIssues(t, "misspell", source, expected)
    16  }