feat: repo health check (#16) #17

Merged
张泊明518370910136 merged 37 commits from file_check into master 2024-09-11 20:09:27 +08:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit 43b8f374db - Show all commits

View File

@ -10,15 +10,6 @@ import (
"strings" "strings"
) )
func inString(str1 string, strList []string) bool {
for _, str := range strList {
if str1 == str {
return true
}
}
return false
}
// getForbiddens retrieves a list of forbidden files in the specified root directory. // getForbiddens retrieves a list of forbidden files in the specified root directory.
// It searches for files that do not match the specified regex patterns in the given file list. // It searches for files that do not match the specified regex patterns in the given file list.
func getForbiddens(root string, fileList []string, localList string) ([]string, error) { func getForbiddens(root string, fileList []string, localList string) ([]string, error) {

View File

@ -5,6 +5,15 @@ import (
"regexp" "regexp"
) )
func inString(str1 string, strList []string) bool {
for _, str := range strList {
if str1 == str {
return true
}
}
return false
}
// addExt appends the specified extension to each file name in the given fileList. // addExt appends the specified extension to each file name in the given fileList.
// It modifies the original fileList in place. // It modifies the original fileList in place.
func addExt(fileList []string, ext string) { func addExt(fileList []string, ext string) {