fix(healthcheck): remove unused args #59

Merged
张泊明518370910136 merged 2 commits from fix-health-check into master 2024-10-14 22:44:31 +08:00
Showing only changes of commit f6e7ea73bd - Show all commits

View File

@ -78,8 +78,17 @@ func ForbiddenCheck(rootDir string, regexList []string, localList string) error
}
if len(forbids) > 0 {
return fmt.Errorf("The following forbidden files were found: `%s`\n",
strings.Join(forbids, "`, `"))
return fmt.Errorf("The following forbidden files were found: `%s`\n\n"+
"To fix it, first make a backup of your repository and then run the following commands:\n"+
"```bash\n"+
"export GIT_BRANCH=$(git branch --show-current)\n"+
"export GIT_REMOTE_URL=$(git config --get remote.origin.url)\n"+
"for i in %s; do git filter-repo --force --invert-paths --path \"$i\"; done\n"+
"git remote add origin $GIT_REMOTE_URL\n"+
"git push --set-upstream origin $GIT_BRANCH --force\n"+
"```\n",
strings.Join(forbids, "`, `"),
strings.Join(forbids, " "))
}
return nil
}