fix: resolve vet warnings and remove stale workflows
Some checks failed
Deploy / Test (push) Failing after 1s
Deploy / Build App Image (push) Has been skipped
Security Scan / Secret Detection (push) Successful in 21s
Deploy / Build Web Image (push) Has been skipped
Security Scan / Dependency & Config Scan (push) Failing after 20s
Deploy / Build Core Image (push) Failing after 10m18s
Deploy / Deploy to Production (push) Has been skipped
Security Scan / Go Vulnerability Check (push) Failing after 6m27s

- Fix 11 non-constant format string warnings in cmd/session
  (use cli.Print format args instead of fmt.Sprintf wrapper)
- Remove leftover .github/workflows/ from cmd/updater
  (ci.yml and release.yml from when updater was standalone)

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-02-21 19:54:51 +00:00
parent 4163aedec1
commit 74c61f3698
3 changed files with 17 additions and 66 deletions

View file

@ -64,11 +64,11 @@ func addListCommand(parent *cli.Command) {
return nil
}
cli.Print(cli.HeaderStyle.Render("Recent Sessions"))
cli.Print("")
cli.Print("%s", cli.HeaderStyle.Render("Recent Sessions"))
cli.Print("%s", "")
for i, s := range sessions {
if i >= 20 {
cli.Print(cli.DimStyle.Render(fmt.Sprintf(" ... and %d more", len(sessions)-20)))
cli.Print(" ... and %d more", len(sessions)-20)
break
}
dur := s.EndTime.Sub(s.StartTime)
@ -80,10 +80,10 @@ func addListCommand(parent *cli.Command) {
if len(id) > 8 {
id = id[:8]
}
cli.Print(fmt.Sprintf(" %s %s%s",
cli.Print(" %s %s%s",
cli.ValueStyle.Render(id),
s.StartTime.Format("2006-01-02 15:04"),
cli.DimStyle.Render(durStr)))
cli.DimStyle.Render(durStr))
}
return nil
},
@ -106,7 +106,7 @@ func addReplayCommand(parent *cli.Command) {
return fmt.Errorf("session not found: %s", id)
}
cli.Print(fmt.Sprintf("Parsing %s...", cli.ValueStyle.Render(filepath.Base(path))))
cli.Print("Parsing %s...", cli.ValueStyle.Render(filepath.Base(path)))
sess, err := session.ParseTranscript(path)
if err != nil {
@ -119,8 +119,8 @@ func addReplayCommand(parent *cli.Command) {
toolCount++
}
}
cli.Print(fmt.Sprintf(" %d events, %d tool calls",
len(sess.Events), toolCount))
cli.Print(" %d events, %d tool calls",
len(sess.Events), toolCount)
// HTML output
htmlPath := output
@ -130,15 +130,15 @@ func addReplayCommand(parent *cli.Command) {
if err := session.RenderHTML(sess, htmlPath); err != nil {
return fmt.Errorf("render html: %w", err)
}
cli.Print(cli.SuccessStyle.Render(fmt.Sprintf(" HTML: %s", htmlPath)))
cli.Print("%s", cli.SuccessStyle.Render(fmt.Sprintf(" HTML: %s", htmlPath)))
// MP4 output
if mp4 {
mp4Path := strings.TrimSuffix(htmlPath, ".html") + ".mp4"
if err := session.RenderMP4(sess, mp4Path); err != nil {
cli.Print(cli.ErrorStyle.Render(fmt.Sprintf(" MP4: %s", err)))
cli.Print("%s", cli.ErrorStyle.Render(fmt.Sprintf(" MP4: %s", err)))
} else {
cli.Print(cli.SuccessStyle.Render(fmt.Sprintf(" MP4: %s", mp4Path)))
cli.Print("%s", cli.SuccessStyle.Render(fmt.Sprintf(" MP4: %s", mp4Path)))
}
}
@ -166,19 +166,19 @@ func addSearchCommand(parent *cli.Command) {
return nil
}
cli.Print(cli.HeaderStyle.Render(fmt.Sprintf("Found %d matches", len(results))))
cli.Print("")
cli.Print("%s", cli.HeaderStyle.Render(fmt.Sprintf("Found %d matches", len(results))))
cli.Print("%s", "")
for _, r := range results {
id := r.SessionID
if len(id) > 8 {
id = id[:8]
}
cli.Print(fmt.Sprintf(" %s %s %s",
cli.Print(" %s %s %s",
cli.ValueStyle.Render(id),
r.Timestamp.Format("15:04:05"),
cli.DimStyle.Render(r.Tool)))
cli.Print(fmt.Sprintf(" %s", truncateStr(r.Match, 100)))
cli.Print("")
cli.DimStyle.Render(r.Tool))
cli.Print(" %s", truncateStr(r.Match, 100))
cli.Print("%s", "")
}
return nil
},

View file

@ -1,25 +0,0 @@
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.25
- name: Run Go Generate
run: go generate ./...
- name: Run Tests
run: go test -v -coverprofile=coverage.out ./...
- name: Upload to Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.out
fail_ci_if_error: false

View file

@ -1,24 +0,0 @@
name: release
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}