From 37d8cb136a59f67d6319036d2d7cd2efe609f434 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Tue, 2 Jun 2026 14:35:58 +0000 Subject: [PATCH] fix: format imports and rename typo-flagged var --- agent/agentcontext/drpc_test.go | 1 - agent/agentcontext/watch.go | 4 ++-- agent/agentcontext/watch_test.go | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/agent/agentcontext/drpc_test.go b/agent/agentcontext/drpc_test.go index edab532f7b..ba25020750 100644 --- a/agent/agentcontext/drpc_test.go +++ b/agent/agentcontext/drpc_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/stretchr/testify/require" - "storj.io/drpc/drpcerr" "github.com/coder/coder/v2/agent/agentcontext" diff --git a/agent/agentcontext/watch.go b/agent/agentcontext/watch.go index 02118fbe91..a5b6c1d318 100644 --- a/agent/agentcontext/watch.go +++ b/agent/agentcontext/watch.go @@ -292,8 +292,8 @@ func (*Watcher) collectDirs(roots []ScanRoot) map[string]struct{} { if err != nil { // Watch the deepest existing ancestor so the // root being created later still fires. - if anc := existingAncestor(root.Path); anc != "" { - out[anc] = struct{}{} + if ancestor := existingAncestor(root.Path); ancestor != "" { + out[ancestor] = struct{}{} } continue } diff --git a/agent/agentcontext/watch_test.go b/agent/agentcontext/watch_test.go index f46a47b753..ba7d7968e3 100644 --- a/agent/agentcontext/watch_test.go +++ b/agent/agentcontext/watch_test.go @@ -10,10 +10,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/coder/quartz" - "github.com/coder/coder/v2/agent/agentcontext" "github.com/coder/coder/v2/testutil" + "github.com/coder/quartz" ) func TestWatcher_FiresOnAgentsMdEdit(t *testing.T) {