style: fix gofmt formatting across all affected files (#279)
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 <noreply@anthropic.com>
This commit is contained in:
parent
ec12fed0a0
commit
45648858a8
12 changed files with 16 additions and 20 deletions
|
|
@ -169,5 +169,3 @@ func IngestFile(ctx context.Context, filePath, collectionName string) (int, erro
|
||||||
|
|
||||||
return rag.IngestFile(ctx, qdrantClient, ollamaClient, collectionName, filePath, rag.DefaultChunkConfig())
|
return rag.IngestFile(ctx, qdrantClient, ollamaClient, collectionName, filePath, rag.DefaultChunkConfig())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
jobsTargets []string
|
jobsTargets []string
|
||||||
jobsIssueRepo string
|
jobsIssueRepo string
|
||||||
jobsDryRun bool
|
jobsDryRun bool
|
||||||
jobsCopies int
|
jobsCopies int
|
||||||
)
|
)
|
||||||
|
|
||||||
func addJobsCommand(parent *cli.Command) {
|
func addJobsCommand(parent *cli.Command) {
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,6 @@ func buildTargetRepo(target string) (*repos.Repo, string) {
|
||||||
return &repos.Repo{Name: parts[1]}, target
|
return &repos.Repo{Name: parts[1]}, target
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// AlertSummary holds aggregated alert counts.
|
// AlertSummary holds aggregated alert counts.
|
||||||
type AlertSummary struct {
|
type AlertSummary struct {
|
||||||
Critical int
|
Critical int
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ func (cb *ClaudeBridge) connectToMCP() {
|
||||||
log.Printf("Claude bridge MCP read error: %v", err)
|
log.Printf("Claude bridge MCP read error: %v", err)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
case cb.broadcast <- message:
|
case cb.broadcast <- message:
|
||||||
default:
|
default:
|
||||||
log.Printf("Claude bridge: broadcast channel full, dropping message")
|
log.Printf("Claude bridge: broadcast channel full, dropping message")
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ import (
|
||||||
|
|
||||||
// CLI commands available via IPC
|
// CLI commands available via IPC
|
||||||
_ "github.com/host-uk/core/internal/cmd/ai"
|
_ "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/deploy"
|
||||||
|
_ "github.com/host-uk/core/internal/cmd/dev"
|
||||||
_ "github.com/host-uk/core/internal/cmd/php"
|
_ "github.com/host-uk/core/internal/cmd/php"
|
||||||
_ "github.com/host-uk/core/internal/cmd/rag"
|
_ "github.com/host-uk/core/internal/cmd/rag"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ func (e *Executor) executeModule(ctx context.Context, host string, client *SSHCl
|
||||||
oldPass := client.becomePass
|
oldPass := client.becomePass
|
||||||
|
|
||||||
client.SetBecome(true, task.BecomeUser, "")
|
client.SetBecome(true, task.BecomeUser, "")
|
||||||
|
|
||||||
defer client.SetBecome(oldBecome, oldUser, oldPass)
|
defer client.SetBecome(oldBecome, oldUser, oldPass)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,6 @@ func (c *SSHClient) Connect(ctx context.Context) error {
|
||||||
return log.E("ssh.Connect", fmt.Sprintf("ssh connect %s", addr), err)
|
return log.E("ssh.Connect", fmt.Sprintf("ssh connect %s", addr), err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
c.client = ssh.NewClient(sshConn, chans, reqs)
|
c.client = ssh.NewClient(sshConn, chans, reqs)
|
||||||
return nil
|
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)
|
// Use cat to write the file (simpler than SCP)
|
||||||
writeCmd := fmt.Sprintf("cat > %q && chmod %o %q", remote, mode, remote)
|
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
|
// 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.
|
// But we need to be careful with handling stdin for sudo + cat.
|
||||||
// We'll use a session with piped stdin.
|
// We'll use a session with piped stdin.
|
||||||
|
|
||||||
session2, err := c.client.NewSession()
|
session2, err := c.client.NewSession()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return log.E("ssh.Upload", "new session for write", err)
|
return log.E("ssh.Upload", "new session for write", err)
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@ import (
|
||||||
|
|
||||||
// Flag variables for release command
|
// Flag variables for release command
|
||||||
var (
|
var (
|
||||||
releaseVersion string
|
releaseVersion string
|
||||||
releaseDraft bool
|
releaseDraft bool
|
||||||
releasePrerelease bool
|
releasePrerelease bool
|
||||||
releaseGoForLaunch bool
|
releaseGoForLaunch bool
|
||||||
)
|
)
|
||||||
|
|
||||||
var releaseCmd = &cli.Command{
|
var releaseCmd = &cli.Command{
|
||||||
|
|
|
||||||
|
|
@ -213,4 +213,4 @@ func IngestFile(ctx context.Context, qdrant *QdrantClient, ollama *OllamaClient,
|
||||||
}
|
}
|
||||||
|
|
||||||
return len(points), nil
|
return len(points), nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,4 +117,4 @@ func (o *OllamaClient) VerifyModel(ctx context.Context) error {
|
||||||
// Model returns the configured embedding model name.
|
// Model returns the configured embedding model name.
|
||||||
func (o *OllamaClient) Model() string {
|
func (o *OllamaClient) Model() string {
|
||||||
return o.config.Model
|
return o.config.Model
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,4 +222,4 @@ func valueToGo(v *qdrant.Value) any {
|
||||||
default:
|
default:
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -160,4 +160,4 @@ func FormatResultsJSON(results []QueryResult) string {
|
||||||
}
|
}
|
||||||
sb.WriteString("]")
|
sb.WriteString("]")
|
||||||
return sb.String()
|
return sb.String()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue