-
Notifications
You must be signed in to change notification settings - Fork 267
gometalinter fails for single file #119
Comments
gometalinter doesn't support linting individual files. You can see this in the command line help:
|
That is an odd error though... |
Most linters can be run over a single file, sometimes it can help to have this option to check only one file |
can I PR? |
Agreed that it would be great to support running over just a single file. For integration with tools that run linters on saving a file, it would be really wasteful to always have to compute lint results for the entire package. As @sijad mentions, most of the common linters for Go support running on a single file - would be great to be able to do the same with |
I don't really mind one way or the other, so if the change is minimal I'm happy for a PR. |
BTW, I think there's some exaggeration or misunderstanding here. vim-go and SublimeLinter-contrib-gometalinter both do lint on save. In the latter case, it also supports live linting and is very reponsive. So practically speaking it's not an issue. Also, I think you'll find that the slower linters perform type resolution, which is necessarily cross-package and quite slow regardless. |
when I try to run
gometalinter /paht/to/myfile.go
I get something like this:The text was updated successfully, but these errors were encountered: