fix(healthcheck): ignore with space
This commit is contained in:
parent
38f11788a0
commit
ca2b40805f
|
@ -47,6 +47,11 @@ func getForbiddens(root string) ([]string, error) {
|
|||
}
|
||||
match := ignore.Relative(relPath, true)
|
||||
|
||||
// Trim trailing spaces from the match pattern
|
||||
if match != nil && strings.TrimSpace(match.Pattern()) != match.Pattern() {
|
||||
match = gitignore.NewMatch(strings.TrimSpace(match.Pattern()))
|
||||
}
|
||||
|
||||
// Check if the relative file path should be ignored based on the .gitignore rules
|
||||
if match != nil && match.Ignore() {
|
||||
matches = append(matches, path)
|
||||
|
|
Loading…
Reference in New Issue
Block a user