-
Notifications
You must be signed in to change notification settings - Fork 267
structcheck *.go different than structcheck . #34
Comments
Is there a particular reason gometalinter was written to operate on *.go rather than assuming operation on directories at a time? |
Yes. If you have a directory |
This is reproducible even running gometalinter on gometalinter
One option is to |
That worked! |
Hmm, except it broke the tests. |
:( I prefer the older version. In general though, isn't |
At least the tools that don't recurse into subdirectories. |
That would modify vet and varcheck. |
Well, there's no "better" here, they all work completely differently. Even tools from the same author work differently. So I basically just try different approaches and use whatever works. |
What are your thoughts on changing vet and varcheck to match the "cd &&" model? I think it's closer to what most people do so is probably more future proof. |
The dupl change may be too aggressive. It's the output we eventually want (with dupl running on ./...) but metalinter runs it on subdirectories so you end up dupl-ing into subdirectories multiple times. |
Ah yes, got a little carried away there. |
Calling
structcheck *.go
is different than callingstructcheck .
, which is causing issues running the meta linter.Particularly, if you have a struct defined in one file and in another file inside the same package you add a method to that struct, then
structcheck *.go
(and gometalinter) will reportundeclared name
on that method whilestructcheck .
will report no errors.The text was updated successfully, but these errors were encountered: