mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-12 10:16:37 +08:00
autoresearch iter 31: isolate lint result cache per checkout in harness
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
set -uo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "${ROOT}/backend"
|
||||
|
||||
# Same per-checkout lint cache as measure.sh: golangci-lint's default cache is
|
||||
# machine-wide, so a different worktree analysing identical sources can make this
|
||||
# Guard read back a stale verdict. Key it to the backend directory.
|
||||
GOLANGCI_LINT_CACHE="${TMPDIR:-/tmp}/ar-lint-cache-$(pwd | cksum | awk '{print $1}')"
|
||||
export GOLANGCI_LINT_CACHE
|
||||
|
||||
STATUS=0
|
||||
fail() { echo "GUARD FAIL: $1"; STATUS=1; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user