From 83b6cb6b2cc8a9ac7f9e5d6946f1138f746e4530 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 17 Oct 2024 15:01:36 +0800 Subject: [PATCH] fix(healthcheck/forbidden): skip `.` --- pkg/healthcheck/forbidden.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/healthcheck/forbidden.go b/pkg/healthcheck/forbidden.go index 53e96a1..c88c33d 100644 --- a/pkg/healthcheck/forbidden.go +++ b/pkg/healthcheck/forbidden.go @@ -25,7 +25,10 @@ func getForbiddens(root string, fileList []string) ([]string, error) { return err } - if info.IsDir() && info.Name() == ".git" { + if info.IsDir() && (info.Name() == ".") { + return nil + } + if info.IsDir() && (info.Name() == ".git") { return filepath.SkipDir } else { match := ignore.Relative(info.Name(), true)