You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please add option to exclude files from the report -- primarily to omit auto-generated sources.
Edit. Even better ignore files following the go convention:
var (
genHdr= []byte("// Code generated ")
genFtr= []byte(" DO NOT EDIT.")
)
// isGenerated reports whether the source file is generated code// according the rules from https://golang.org/s/generatedcode.// This is inherited from the original go lint.funcisGenerated(src []byte) bool {
sc:=bufio.NewScanner(bytes.NewReader(src))
forsc.Scan() {
b:=sc.Bytes()
ifbytes.HasPrefix(b, genHdr) &&bytes.HasSuffix(b, genFtr) &&len(b) >=len(genHdr)+len(genFtr) {
returntrue
}
}
returnfalse
}
The text was updated successfully, but these errors were encountered:
Please add option to exclude files from the report -- primarily to omit auto-generated sources.
Edit. Even better ignore files following the go convention:
The text was updated successfully, but these errors were encountered: