From 9734695c3b17df44e43343e39d8eceeccd37c575 Mon Sep 17 00:00:00 2001 From: Morgan Date: Thu, 8 Feb 2024 18:36:14 +0100 Subject: [PATCH] fix(misc/genstd): ignore gno generated files (#1633) The generated preprocessing files "confuse" genstd in standard libraries and make it fail. This should fix it :) --- misc/genstd/genstd.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/genstd/genstd.go b/misc/genstd/genstd.go index 318a63e5ee8..9d0c21c5229 100644 --- a/misc/genstd/genstd.go +++ b/misc/genstd/genstd.go @@ -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 }