{"action":"created","issue":{"url":"https://api.github.com/repos/alecthomas/gometalinter/issues/17","labels_url":"https://api.github.com/repos/alecthomas/gometalinter/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/alecthomas/gometalinter/issues/17/comments","events_url":"https://api.github.com/repos/alecthomas/gometalinter/issues/17/events","html_url":"https://github.com/alecthomas/gometalinter/issues/17","id":73282786,"number":17,"title":"Invalid output for files that cannot be parsed","user":{"login":"noonien","id":126649,"avatar_url":"https://avatars.githubusercontent.com/u/126649?v=3","gravatar_id":"","url":"https://api.github.com/users/noonien","html_url":"https://github.com/noonien","followers_url":"https://api.github.com/users/noonien/followers","following_url":"https://api.github.com/users/noonien/following{/other_user}","gists_url":"https://api.github.com/users/noonien/gists{/gist_id}","starred_url":"https://api.github.com/users/noonien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noonien/subscriptions","organizations_url":"https://api.github.com/users/noonien/orgs","repos_url":"https://api.github.com/users/noonien/repos","events_url":"https://api.github.com/users/noonien/events{/privacy}","received_events_url":"https://api.github.com/users/noonien/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-05T11:08:59Z","updated_at":"2015-05-05T13:12:45Z","closed_at":"2015-05-05T13:04:25Z","body":"Given the following file named test.go, containing: \r\n\r\n```go\r\ntest\r\n```\r\n\r\nRunning `gometalitnter` provides the following output:\r\n\r\n```\r\ntest.go:1:1:warning: expected 'package', found 'IDENT' test (golint)\r\ntest.go:1:1:warning: expected 'package', found 'IDENT' test (deadcode)\r\n test.go:1:1:warning: expected 'package', found 'IDENT' test (go-nyet)\r\n2015/05/05 14:4::warning: unused global variable 28 cannot import package . (varcheck)\r\n    test.go:1::warning: unused global variable 1: expected 'package', found 'IDENT' test (varcheck)\r\n    test.go:1::warning: unused global variable 1: expected 'package', found 'IDENT' test (varcheck)\r\n2015/05/05 14:4::error: 28 cannot import package . (defercheck)\r\n    test.go:1::error: 1: expected 'package', found 'IDENT' test (defercheck)\r\n    test.go:1::error: 1: expected 'package', found 'IDENT' test (defercheck)\r\n2015/05/05 14:4::warning: unused struct field 28 cannot import package . (structcheck)\r\n    test.go:1::warning: unused struct field 1: expected 'package', found 'IDENT' test (structcheck)\r\n    test.go:1::warning: unused struct field 1: expected 'package', found 'IDENT' test (structcheck)\r\ntest.go:1:1:error: expected 'package', found 'IDENT' test (gotype)\r\ntest.go:1::error: 1: expected 'package', found 'IDENT' test (vet)\r\n\r\n```\r\n\r\nSimilar outputs are given with contents that cannot be parsed, such as:\r\n\r\n```go\r\npackage main\r\n\r\ntest\r\n\r\nfunc main() {\r\n}\r\n```\r\n\r\nFirst of all, some lines contain the current date, instead of the file name, some are appear to be indented.\r\n\r\nAlso, in the case of a parsing error, I don't think there's a need to run the other tools, since they appear to provide the same error messages."},"comment":{"url":"https://api.github.com/repos/alecthomas/gometalinter/issues/comments/99074506","html_url":"https://github.com/alecthomas/gometalinter/issues/17#issuecomment-99074506","issue_url":"https://api.github.com/repos/alecthomas/gometalinter/issues/17","id":99074506,"user":{"login":"alecthomas","id":41767,"avatar_url":"https://avatars.githubusercontent.com/u/41767?v=3","gravatar_id":"","url":"https://api.github.com/users/alecthomas","html_url":"https://github.com/alecthomas","followers_url":"https://api.github.com/users/alecthomas/followers","following_url":"https://api.github.com/users/alecthomas/following{/other_user}","gists_url":"https://api.github.com/users/alecthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/alecthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alecthomas/subscriptions","organizations_url":"https://api.github.com/users/alecthomas/orgs","repos_url":"https://api.github.com/users/alecthomas/repos","events_url":"https://api.github.com/users/alecthomas/events{/privacy}","received_events_url":"https://api.github.com/users/alecthomas/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T13:12:45Z","updated_at":"2015-05-05T13:12:45Z","body":"Your example code now produces:\r\n\r\n```\r\n$ gometalinter .\r\nt.go:3:1:warning: unused global variable expected declaration, found 'IDENT' test (varcheck)\r\nt.go:3:1:warning: unused struct field expected declaration, found 'IDENT' test (structcheck)\r\nt.go:3:1:error: expected declaration, found 'IDENT' test (gotype)\r\nt.go:3:1:warning: expected declaration, found 'IDENT' test (deadcode)\r\nt.go:3:1:warning: expected declaration, found 'IDENT' test (golint)\r\n```"}}