internal/vettools: bug fix: vettool itself failed with vettool check

This commit is contained in:
Hajime Hoshi 2023-10-04 12:56:05 +09:00
parent b27238e989
commit 0af42e6620

View File

@ -15,6 +15,7 @@
package main package main
import ( import (
"fmt"
"os" "os"
"github.com/kisielk/errcheck/errcheck" "github.com/kisielk/errcheck/errcheck"
@ -27,7 +28,10 @@ import (
func main() { func main() {
const filename = ".errcheck_excludes" const filename = ".errcheck_excludes"
if _, err := os.Stat(filename); err == nil { if _, err := os.Stat(filename); err == nil {
errcheck.Analyzer.Flags.Set("exclude", filename) if err := errcheck.Analyzer.Flags.Set("exclude", filename); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
} }
multichecker.Main(atomic.Analyzer, multichecker.Main(atomic.Analyzer,
atomicalign.Analyzer, atomicalign.Analyzer,