Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Scope pre-commit golangci-lint to staged packages
rcourtman6c426d9f1aee
diff --git a/.husky/pre-commit b/.husky/pre-commitindex 42e25a2be0..9f295f13a3 100755--- a/.husky/pre-commit+++ b/.husky/pre-commit@@ -129,7 +129,12 @@ python3 scripts/release_control/format_staged_go.pyif command -v golangci-lint >/dev/null 2>&1; thenif staged_files_match '(^|/).*\.go$|(^|/)go\.(mod|sum|work|work\.sum)$|^\.golangci\.ya?ml$'; thenecho "Running golangci-lint..."- GOMAXPROCS="${GOMAXPROCS:-2}" golangci-lint run --concurrency "${GOLANGCI_LINT_CONCURRENCY:-2}" ./...+ # Lint only packages containing staged Go files, not the entire repo+ STAGED_GO_PKGS=$(git diff --cached --name-only | grep '\.go$' | xargs -I{} dirname {} 2>/dev/null | sort -u | sed 's|^|./|' | tr '\n' ' ')+ if [ -z "$STAGED_GO_PKGS" ]; then+ STAGED_GO_PKGS="./..."+ fi+ GOMAXPROCS="${GOMAXPROCS:-2}" golangci-lint run --concurrency "${GOLANGCI_LINT_CONCURRENCY:-2}" --timeout "${GOLANGCI_LINT_TIMEOUT:-5m}" $STAGED_GO_PKGSelseecho "Skipping golangci-lint (no staged Go/module/linter changes)."fi