[go-nuts] Re: vet: Respect PATH

2024-05-21 Thread andrew.p...@gmail.com
directory recursion to more of these tools. On Tuesday, May 21, 2024 at 10:48:12 AM UTC-5 andrew.p...@gmail.com wrote: > Similar request for gofmt. It should accept the ordinary ./... Go project > recursion syntax, instead of the awkward, explicit: > > func GoFmt(args ...string) error { &g

[go-nuts] Re: vet: Respect PATH

2024-05-21 Thread andrew.p...@gmail.com
he tool to implement itself, directly. Looping over files in wrapping scripts, such as shell code, invites dragons. On Tuesday, May 21, 2024 at 10:45:14 AM UTC-5 andrew.p...@gmail.com wrote: > go vet fails to obey the standard PATH environment variable (POSIX, > Windows). This makes

[go-nuts] vet: Respect PATH

2024-05-21 Thread andrew.p...@gmail.com
go vet fails to obey the standard PATH environment variable (POSIX, Windows). This makes it unnecessarily cumbersome to use go vet. Here is an example (Mage) script to scan Go projects for variable shadowing: func GoVetShadow(args ...string) error { shadowPath, err := exec.LookPath("shadow") if