chore(autoresearch): init cordis-quality session files

This commit is contained in:
ryan
2026-08-28 16:21:34 +08:00
parent 3a61c38dc5
commit 078ad9b2f3
4 changed files with 88 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
# Autoresearch measure: golangci-lint issue count (primary) + dupl subset + test packages
set -euo pipefail
cd "$(dirname "$0")/../backend"
# Primary metric: total golangci-lint issues (non-test code)
golangci-lint run > /tmp/ar_lint.txt 2>&1 || true
LINT_ISSUES=$(grep -cE '(^|[/\\])[^/\\:]+\.go:[0-9]+:' /tmp/ar_lint.txt || true)
# Secondary: dupl-specific issues
DUP_ISSUES=$(grep -cE '\(dupl\)$' /tmp/ar_lint.txt || true)
# Secondary: passing test packages (regression guard)
TESTS_PASSED=$(go test ./... 2>&1 | grep -c '^ok' || true)
echo "METRIC lint_issues=${LINT_ISSUES}"
echo "METRIC dup_issues=${DUP_ISSUES}"
echo "METRIC tests_passed=${TESTS_PASSED}"