-
Notifications
You must be signed in to change notification settings - Fork 492
golint: add flag to ignore vendor dirs #303
Conversation
A typical usage for a project is: golint ./... Scanning all vendored packages creates noise, takes time and is usually not useful. Add -vendor flag that controls inclusion of vendor dirs during ... expansion. Note: this changes default behavior as the default value for the flag is false. This is debatable. The rationale for false is: - go tool at tip ignores vendor during fmt and test - people generally don't want to change vendored packages, especially for style
If the |
@mvdan On second thought, I think you are right. |
Yeah, |
Not necessarily the way forward, but a workaround should you use $ golint $(glide novendor) |
Change seems fine to me, but let's avoid the flag. |
Any update on this? Go 1.9 is released and |
@mholt : was browsing the PRs in this repo so I'm not aware to the context of this one, but personally since
Note the backquotes that make it run in a subshell (you could also use |
@Horgix Thanks; yeah, I have a bash script that can work around it, but it's not as pretty on Windows CI... |
Since I think that it should not check the packages in |
In light of the changes in Go 1.9, I think the default behaviour for |
@nathany To be clear, it looks like this PR does cause |
Feel free to take over. |
This worked for me. |
golint This worked for me! |
A typical usage for a project is: golint ./...
Scanning all vendored packages creates noise,
takes time and is usually not useful.
Add -vendor flag that controls inclusion of vendor
dirs during ... expansion.
Note: this changes default behavior as the default
value for the flag is false. This is debatable.
The rationale for false is:
packages, especially for style