P2R-02: UI rewire against the slim-schedule + source-group model #2
@@ -26,7 +26,7 @@ repos:
|
||||
- id: gofumpt
|
||||
name: gofumpt
|
||||
description: Format Go files with gofumpt (stricter superset of gofmt)
|
||||
entry: gofumpt -l -w
|
||||
entry: bash -c 'PATH="$(go env GOPATH)/bin:$PATH" exec gofumpt -l -w "$@"' --
|
||||
language: system
|
||||
types: [go]
|
||||
pass_filenames: true
|
||||
@@ -42,7 +42,7 @@ repos:
|
||||
- id: golangci-lint
|
||||
name: golangci-lint
|
||||
description: Run golangci-lint against the whole module (matches CI)
|
||||
entry: golangci-lint run ./...
|
||||
entry: bash -c 'PATH="$(go env GOPATH)/bin:$PATH" exec golangci-lint run ./...'
|
||||
language: system
|
||||
types: [go]
|
||||
pass_filenames: false
|
||||
|
||||
@@ -60,7 +60,7 @@ lint: ## Run golangci-lint
|
||||
|
||||
setup: hooks ## One-time per-clone setup (Go tools + git hooks)
|
||||
@command -v gofumpt >/dev/null 2>&1 || go install mvdan.cc/gofumpt@latest
|
||||
@command -v golangci-lint >/dev/null 2>&1 || go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6
|
||||
@command -v golangci-lint >/dev/null 2>&1 || go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.5.0
|
||||
@echo "==> setup complete: gofumpt, golangci-lint, pre-commit hooks installed"
|
||||
|
||||
hooks: ## Install the pre-commit hooks defined in .pre-commit-config.yaml
|
||||
|
||||
@@ -102,7 +102,7 @@ func enrolHostForWS(t *testing.T, srv *Server, st *store.Store, name string) (ho
|
||||
if err := st.SetHostCredentials(context.Background(), hostID, enc); err != nil {
|
||||
t.Fatalf("set creds: %v", err)
|
||||
}
|
||||
return
|
||||
return hostID, token
|
||||
}
|
||||
|
||||
func sendHello(t *testing.T, c *websocket.Conn, hostname string) {
|
||||
|
||||
@@ -47,7 +47,7 @@ func setupTestHub(t *testing.T) (url string, token string, hostID string, st *st
|
||||
t.Fatalf("enroll: %v", err)
|
||||
}
|
||||
url = "ws" + strings.TrimPrefix(srv.URL, "http") + "/ws/agent"
|
||||
return
|
||||
return url, token, hostID, st, hub
|
||||
}
|
||||
|
||||
func TestWSHelloAndHeartbeat(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user