#26: fix spaces in nolint directive

This commit is contained in:
golangci 2018-05-28 12:19:55 +03:00
parent ad581d3b55
commit cad9fc7760
3 changed files with 36 additions and 18 deletions

View file

@ -24,10 +24,17 @@ func TestNolint(t *testing.T) {
processAssertEmpty(t, p, newNolintFileIssue(3, "gofmt")) // check cached is ok
processAssertSame(t, p, newNolintFileIssue(3, "gofmtA")) // check different name
processAssertEmpty(t, p, newNolintFileIssue(4, "any"))
processAssertEmpty(t, p, newNolintFileIssue(5, "any"))
processAssertEmpty(t, p, newNolintFileIssue(4, "gofmt"))
processAssertSame(t, p, newNolintFileIssue(4, "gofmtA")) // check different name
processAssertSame(t, p, newNolintFileIssue(1, "golint"))
processAssertEmpty(t, p, newNolintFileIssue(5, "gofmt"))
processAssertEmpty(t, p, newNolintFileIssue(5, "govet"))
processAssertSame(t, p, newNolintFileIssue(5, "gofmtA")) // check different name
processAssertEmpty(t, p, newNolintFileIssue(6, "any"))
processAssertEmpty(t, p, newNolintFileIssue(7, "any"))
processAssertSame(t, p, newNolintFileIssue(1, "golint")) // no directive
}
func TestNoIssuesInAutogeneratedFile(t *testing.T) {