mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-14 21:25:09 +08:00
test: validate raw stream token replay and enforce gofmt in lint script
This commit is contained in:
16
scripts/lint.sh
Executable file
16
scripts/lint.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
LINT_BIN="${GOLANGCI_LINT_BIN:-golangci-lint}"
|
||||
|
||||
# v2 separates formatters from linters; enforce both in one entrypoint.
|
||||
if [[ "$LINT_BIN" == *" "* ]]; then
|
||||
eval "$LINT_BIN fmt --diff -c .golangci.yml"
|
||||
eval "$LINT_BIN run -c .golangci.yml"
|
||||
else
|
||||
"$LINT_BIN" fmt --diff -c .golangci.yml
|
||||
"$LINT_BIN" run -c .golangci.yml
|
||||
fi
|
||||
Reference in New Issue
Block a user