Skip to content

Commit

Permalink
fix(misc/genstd): ignore gno generated files (#1633)
Browse files Browse the repository at this point in the history
The generated preprocessing files "confuse" genstd in standard libraries
and make it fail. This should fix it :)
  • Loading branch information
thehowl authored and leohhhn committed Feb 8, 2024
1 parent ff4a0d1 commit ac82701
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion misc/genstd/genstd.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ func walkStdlibs(stdlibsPath string) ([]*pkgData, error) {
// skip non-source and test files.
ext := filepath.Ext(fpath)
noExt := fpath[:len(fpath)-len(ext)]
if (ext != ".go" && ext != ".gno") || strings.HasSuffix(noExt, "_test") {
if (ext != ".go" && ext != ".gno") ||
strings.HasSuffix(noExt, "_test") ||
strings.HasSuffix(fpath, ".gen.go") {
return nil
}

Expand Down

0 comments on commit ac82701

Please sign in to comment.