From da7ff46042139847cf32ba30afc1e24f4dc0bd86 Mon Sep 17 00:00:00 2001 From: zeroXbrock <2791467+zeroXbrock@users.noreply.github.com> Date: Fri, 21 Jun 2024 16:09:17 -0700 Subject: [PATCH] ignore build-info in docs-gen reading forge artifacts --- tools/docs-gen/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/docs-gen/main.go b/tools/docs-gen/main.go index 6e75620..2cce7ab 100644 --- a/tools/docs-gen/main.go +++ b/tools/docs-gen/main.go @@ -259,6 +259,13 @@ func readForgeArtifacts(path string) ([]*artifact, error) { if d.IsDir() { return nil } + + // ignore if parent directory doesn't end w/ ".sol" + parentDir := filepath.Base(filepath.Dir(path)) + if !strings.HasSuffix(parentDir, ".sol") { + return nil + } + ext := filepath.Ext(d.Name()) if ext != ".json" { return nil