chore: rename whitelistedCharsCSV to whitelistedChars
Some checks failed
build / build (pull_request) Failing after 29m57s
build / build (push) Failing after 4m11s
build / trigger-build-image (push) Has been skipped
build / trigger-build-image (pull_request) Has been cancelled

This commit is contained in:
王韵晨520370910012 2026-04-17 08:27:43 -07:00
parent 2a501f7cf6
commit 8b76780c98
GPG Key ID: F28AB6AE26FFED6F
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ type Result struct {
}
func All(
rootDir, checkFileNameList, checkFileSumList, whitelistedCharsCSV,
rootDir, checkFileNameList, checkFileSumList, whitelistedChars,
allowedDomainList, actorCsvPath string,
metaFile []string, repoSize float64,
) (res Result) {
@ -45,7 +45,7 @@ func All(
} else {
res.Msg += "### Meta File Check Passed\n"
}
err = NonASCIIFiles(rootDir, whitelistedCharsCSV)
err = NonASCIIFiles(rootDir, whitelistedChars)
if err != nil {
res.Msg += fmt.Sprintf("### Non-ASCII Characters File Check Failed:\n%s\n", err.Error())
res.Failed = true

View File

@ -129,8 +129,8 @@ func getNonASCII(root string, whitelist map[rune]struct{}) ([]string, error) {
// NonASCIIFiles checks for non-ASCII characters in files within the specified root directory.
// It prints a message with the paths to files containing non-ASCII characters, if any.
// Additionally it accept a list of whitelisted characters that are allowed, repo-wide.
func NonASCIIFiles(root, whitelistedCharsCSV string) error {
whitelist := parseWhitelistedChars(whitelistedCharsCSV)
func NonASCIIFiles(root, whitelistedChars string) error {
whitelist := parseWhitelistedChars(whitelistedChars)
nonASCII, err := getNonASCII(root, whitelist)
if err != nil {
slog.Error("getting non-ascii", "err", err)