chore: rename whitelistedCharsCSV to whitelistedChars
This commit is contained in:
parent
2a501f7cf6
commit
8b76780c98
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user