diff --git a/developer_toolbox/hooks/pre-commit b/developer_toolbox/hooks/pre-commit index 9cb4b48f..31210b0a 100755 --- a/developer_toolbox/hooks/pre-commit +++ b/developer_toolbox/hooks/pre-commit @@ -11,5 +11,15 @@ if git diff --cached --name-only | grep -q 'config/retrodeck/reference_lists/fea fi fi +# Lint Manifest +# if git diff --cached --name-only | grep -q 'net.retrodeck.retrodeck.yml'; then +# # Run the linting script +# echo "Linting net.retrodeck.retrodeck.yml..." +# if ! bash developer_toolbox/lint_manifest.sh; then +# echo "Linting failed. Please fix the issues and try again." +# exit 1 # Exit with a non-zero status to block the commit +# fi +# fi + # Continue with the commit if all checks passed exit 0 diff --git a/developer_toolbox/lint_manifest.sh b/developer_toolbox/lint_manifest.sh new file mode 100755 index 00000000..9147e142 --- /dev/null +++ b/developer_toolbox/lint_manifest.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +yamllint net.retrodeck.retrodeck.yml