mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-04 02:37:36 +00:00
Add pre-commit hooks for verifying pkg names
This commit is contained in:
@@ -62,6 +62,18 @@ else
|
|||||||
fi
|
fi
|
||||||
echo "${reset}"
|
echo "${reset}"
|
||||||
|
|
||||||
|
echo -ne "Checking for package aliases... "
|
||||||
|
if ! hack/verify-pkg-names.sh > /dev/null; then
|
||||||
|
echo "${red}ERROR!"
|
||||||
|
echo "Some package aliase break go conventions. To fix these errors, "
|
||||||
|
echo "do not use capitalizaed or underlined characters in pkg aliases. "
|
||||||
|
echo "Refer to https://blog.golang.org/package-names for more info."
|
||||||
|
exit_code=1
|
||||||
|
else
|
||||||
|
echo "${green}OK"
|
||||||
|
fi
|
||||||
|
echo "${reset}"
|
||||||
|
|
||||||
echo -ne "Checking for files that need boilerplate... "
|
echo -ne "Checking for files that need boilerplate... "
|
||||||
files=($(git diff --cached --name-only --diff-filter ACM))
|
files=($(git diff --cached --name-only --diff-filter ACM))
|
||||||
# We always make sure there is one file in the files list. Some tools check
|
# We always make sure there is one file in the files list. Some tools check
|
||||||
|
Reference in New Issue
Block a user