From 1e84103059b7b2a3c13bdb397fb9cbd2561a9cde Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 10 Sep 2024 14:50:14 +0900 Subject: [PATCH] REPO: added lint manifest POC [skip ci] --- developer_toolbox/hooks/pre-commit | 10 ++++++++++ developer_toolbox/lint_manifest.sh | 3 +++ 2 files changed, 13 insertions(+) create mode 100755 developer_toolbox/lint_manifest.sh 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