From 1911a88c6fc854c5f0deaad91c390b2d04c71ab6 Mon Sep 17 00:00:00 2001 From: Snider Date: Wed, 4 Feb 2026 01:14:53 +0000 Subject: [PATCH] style: fix gofmt formatting across all affected files Adds missing trailing newlines, fixes indentation alignment, removes extra blank lines, and corrects import ordering. Fixes CI qa format check failures blocking all open PRs. Files fixed: - pkg/rag/{ingest,ollama,qdrant,query}.go (missing trailing newline) - internal/cmd/rag/cmd_ingest.go (extra blank lines) - internal/cmd/security/cmd_jobs.go (var alignment) - internal/cmd/security/cmd_security.go (extra blank line) - internal/core-ide/claude_bridge.go (indentation) - internal/variants/core_ide.go (import ordering) - pkg/ansible/{modules,ssh}.go (whitespace) - pkg/build/buildcmd/cmd_release.go (var alignment) Co-Authored-By: Claude Opus 4.5 --- internal/cmd/rag/cmd_ingest.go | 2 -- internal/cmd/security/cmd_jobs.go | 6 +++--- internal/cmd/security/cmd_security.go | 1 - internal/core-ide/claude_bridge.go | 2 +- internal/variants/core_ide.go | 2 +- pkg/ansible/modules.go | 2 +- pkg/ansible/ssh.go | 5 ++--- pkg/build/buildcmd/cmd_release.go | 8 ++++---- pkg/rag/ingest.go | 2 +- pkg/rag/ollama.go | 2 +- pkg/rag/qdrant.go | 2 +- pkg/rag/query.go | 2 +- 12 files changed, 16 insertions(+), 20 deletions(-) diff --git a/internal/cmd/rag/cmd_ingest.go b/internal/cmd/rag/cmd_ingest.go index b1c7e9f4..e956b22f 100644 --- a/internal/cmd/rag/cmd_ingest.go +++ b/internal/cmd/rag/cmd_ingest.go @@ -169,5 +169,3 @@ func IngestFile(ctx context.Context, filePath, collectionName string) (int, erro return rag.IngestFile(ctx, qdrantClient, ollamaClient, collectionName, filePath, rag.DefaultChunkConfig()) } - - diff --git a/internal/cmd/security/cmd_jobs.go b/internal/cmd/security/cmd_jobs.go index df655e8a..8e0a9e0b 100644 --- a/internal/cmd/security/cmd_jobs.go +++ b/internal/cmd/security/cmd_jobs.go @@ -12,10 +12,10 @@ import ( ) var ( - jobsTargets []string + jobsTargets []string jobsIssueRepo string - jobsDryRun bool - jobsCopies int + jobsDryRun bool + jobsCopies int ) func addJobsCommand(parent *cli.Command) { diff --git a/internal/cmd/security/cmd_security.go b/internal/cmd/security/cmd_security.go index 68f1b4e8..12358b86 100644 --- a/internal/cmd/security/cmd_security.go +++ b/internal/cmd/security/cmd_security.go @@ -203,7 +203,6 @@ func buildTargetRepo(target string) (*repos.Repo, string) { return &repos.Repo{Name: parts[1]}, target } - // AlertSummary holds aggregated alert counts. type AlertSummary struct { Critical int diff --git a/internal/core-ide/claude_bridge.go b/internal/core-ide/claude_bridge.go index 279c745f..a5532e79 100644 --- a/internal/core-ide/claude_bridge.go +++ b/internal/core-ide/claude_bridge.go @@ -78,7 +78,7 @@ func (cb *ClaudeBridge) connectToMCP() { log.Printf("Claude bridge MCP read error: %v", err) break } - select { + select { case cb.broadcast <- message: default: log.Printf("Claude bridge: broadcast channel full, dropping message") diff --git a/internal/variants/core_ide.go b/internal/variants/core_ide.go index 089f38dc..2edb6417 100644 --- a/internal/variants/core_ide.go +++ b/internal/variants/core_ide.go @@ -18,8 +18,8 @@ import ( // CLI commands available via IPC _ "github.com/host-uk/core/internal/cmd/ai" - _ "github.com/host-uk/core/internal/cmd/dev" _ "github.com/host-uk/core/internal/cmd/deploy" + _ "github.com/host-uk/core/internal/cmd/dev" _ "github.com/host-uk/core/internal/cmd/php" _ "github.com/host-uk/core/internal/cmd/rag" ) diff --git a/pkg/ansible/modules.go b/pkg/ansible/modules.go index 200aaa1d..25585af8 100644 --- a/pkg/ansible/modules.go +++ b/pkg/ansible/modules.go @@ -22,7 +22,7 @@ func (e *Executor) executeModule(ctx context.Context, host string, client *SSHCl oldPass := client.becomePass client.SetBecome(true, task.BecomeUser, "") - + defer client.SetBecome(oldBecome, oldUser, oldPass) } diff --git a/pkg/ansible/ssh.go b/pkg/ansible/ssh.go index 9678ba63..6cf3d05e 100644 --- a/pkg/ansible/ssh.go +++ b/pkg/ansible/ssh.go @@ -175,7 +175,6 @@ func (c *SSHClient) Connect(ctx context.Context) error { return log.E("ssh.Connect", fmt.Sprintf("ssh connect %s", addr), err) } - c.client = ssh.NewClient(sshConn, chans, reqs) return nil } @@ -300,11 +299,11 @@ func (c *SSHClient) Upload(ctx context.Context, local io.Reader, remote string, // Use cat to write the file (simpler than SCP) writeCmd := fmt.Sprintf("cat > %q && chmod %o %q", remote, mode, remote) - + // If become is needed, we construct a command that reads password then content from stdin // But we need to be careful with handling stdin for sudo + cat. // We'll use a session with piped stdin. - + session2, err := c.client.NewSession() if err != nil { return log.E("ssh.Upload", "new session for write", err) diff --git a/pkg/build/buildcmd/cmd_release.go b/pkg/build/buildcmd/cmd_release.go index 8c40a984..330c96b3 100644 --- a/pkg/build/buildcmd/cmd_release.go +++ b/pkg/build/buildcmd/cmd_release.go @@ -14,10 +14,10 @@ import ( // Flag variables for release command var ( - releaseVersion string - releaseDraft bool - releasePrerelease bool - releaseGoForLaunch bool + releaseVersion string + releaseDraft bool + releasePrerelease bool + releaseGoForLaunch bool ) var releaseCmd = &cli.Command{ diff --git a/pkg/rag/ingest.go b/pkg/rag/ingest.go index 33b10b11..7418fe36 100644 --- a/pkg/rag/ingest.go +++ b/pkg/rag/ingest.go @@ -213,4 +213,4 @@ func IngestFile(ctx context.Context, qdrant *QdrantClient, ollama *OllamaClient, } return len(points), nil -} \ No newline at end of file +} diff --git a/pkg/rag/ollama.go b/pkg/rag/ollama.go index c68ca14e..fde20d3d 100644 --- a/pkg/rag/ollama.go +++ b/pkg/rag/ollama.go @@ -117,4 +117,4 @@ func (o *OllamaClient) VerifyModel(ctx context.Context) error { // Model returns the configured embedding model name. func (o *OllamaClient) Model() string { return o.config.Model -} \ No newline at end of file +} diff --git a/pkg/rag/qdrant.go b/pkg/rag/qdrant.go index 885def47..7acff859 100644 --- a/pkg/rag/qdrant.go +++ b/pkg/rag/qdrant.go @@ -222,4 +222,4 @@ func valueToGo(v *qdrant.Value) any { default: return nil } -} \ No newline at end of file +} diff --git a/pkg/rag/query.go b/pkg/rag/query.go index ae85af6d..22df5eee 100644 --- a/pkg/rag/query.go +++ b/pkg/rag/query.go @@ -160,4 +160,4 @@ func FormatResultsJSON(results []QueryResult) string { } sb.WriteString("]") return sb.String() -} \ No newline at end of file +}