From 3dd069612b396169249ca197de4ec46f0df5c8b0 Mon Sep 17 00:00:00 2001 From: Julien Vermette Date: Thu, 28 Nov 2024 14:20:12 -0500 Subject: [PATCH] Fix chainlink ignoreFile flag being ignored --- tools/chainlink/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/chainlink/main.go b/tools/chainlink/main.go index e61f0b5629..7ae23020f7 100644 --- a/tools/chainlink/main.go +++ b/tools/chainlink/main.go @@ -30,6 +30,8 @@ func init() { flag.BoolVar(&checkAll, "checkAll", false, "Check all detected URLs, or those belonging to -hostname") flag.BoolVar(&extractMode, "extractOnly", false, "Only extract URLs, don't check them") + flag.Parse() + // won't match anything like `../` or `./` or non-leading `/` URLs // unmatched urls will go into the unchecked result accumulator correctURLregex = regexp.MustCompile(`^(http|https|\/).+`) @@ -43,8 +45,6 @@ func init() { } func main() { - flag.Parse() - err := processContentDir() if err != nil { log.Fatalf("error processing contentDir: %v", err)