Repository Analysis

charmbracelet/crush

Glamourous agentic coding for all 💘

1.7 Likely human-written View on GitHub
1.7
Adjusted Score
1.7
Raw Score
100%
Time Factor
2026-05-30
Last Push
24,824
Stars
Go
Language
126,731
Lines of Code
495
Files
128
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 7HIGH 0MEDIUM 3LOW 118

Pattern Findings

128 matches across 4 categories. Click a row to expand file-level details.

Over-Commented Block109 hits · 109 pts
SeverityFileLineSnippet
LOW.golangci.yml1version: "2"
LOWinternal/ui/anim/anim.go21const (
LOWinternal/ui/chat/applyhighlight_callback_test.go61
LOWinternal/ui/chat/assistant_thinking_window_test.go21// threshold deterministically. Each paragraph is tagged with its
LOWinternal/ui/chat/assistant_thinking_window_test.go101 // width and is not safe for concurrent Render calls).
LOWinternal/ui/chat/assistant_thinking_window_test.go301// thinking block sits in tail-window mode must NOT invalidate the
LOWinternal/ui/chat/assistant.go21const assistantMessageTruncateFormat = "… (%d lines hidden) [click or space to expand]"
LOWinternal/ui/chat/assistant.go41
LOWinternal/ui/chat/assistant.go221}
LOWinternal/ui/chat/assistant.go541 return (isThinking || !isFinished) && !hasContent && !hasToolCalls
LOWinternal/ui/chat/assistant.go581// F8: also drop the streaming-markdown stable-prefix cache because
LOWinternal/ui/chat/assistant.go621 return a.thinkingViewMode != thinkingCollapsed
LOWinternal/ui/chat/agent.go81 }
LOWinternal/ui/chat/incremental_glamour_test.go61 b.WriteByte(s[i])
LOWinternal/ui/chat/incremental_glamour_test.go261 },
LOWinternal/ui/chat/incremental_glamour_test.go561 require.Equal(t, normalizeRender(fresh), normalizeRender(out))
LOWinternal/ui/chat/incremental_glamour_test.go641// -----------------------------------------------------------------------
LOWinternal/ui/chat/incremental_glamour_test.go661
LOWinternal/ui/chat/streaming_markdown.go1package chat
LOWinternal/ui/chat/streaming_markdown.go21// between calls. The boundary check is therefore deliberately
LOWinternal/ui/chat/streaming_markdown.go41// Reset drops every cached field. After Reset the next Render call
LOWinternal/ui/chat/streaming_markdown.go181}
LOWinternal/ui/chat/streaming_markdown.go201// we have the slightest doubt we return -1 and let the caller fall
LOWinternal/ui/chat/streaming_markdown.go241 }
LOWinternal/ui/chat/streaming_markdown.go341// prefixHasOpenHazard reports whether prefix contains any of three
LOWinternal/ui/chat/streaming_markdown.go361//
LOWinternal/ui/chat/streaming_markdown.go381// the prefix forces -1. Suffix-side reference detection is
LOWinternal/ui/chat/streaming_markdown.go421}
LOWinternal/ui/notification/notification.go1// Package notification provides desktop notification support for the UI.
LOWinternal/ui/dialog/common.go61type RenderContext struct {
LOWinternal/ui/common/markdown.go21
LOWinternal/ui/common/markdown.go101
LOWinternal/ui/common/capabilities.go21 // Columns is the number of character columns in the terminal.
LOWinternal/ui/list/list.go41 // the keys that govern invalidation (width and version). The
LOWinternal/ui/list/list.go221 }
LOWinternal/ui/list/item.go1package list
LOWinternal/ui/list/item.go21type Item interface {
LOWinternal/ui/list/item.go41// Versioned is a tiny embeddable helper that satisfies Item.Version()
LOWinternal/ui/model/chat_draw_cache_test.go261 want := freshStyledRender(u.chat.list.Render(), w, h)
LOWinternal/ui/model/chat.go61 pendingClickID int // Incremented on each click to invalidate old pending clicks
LOWinternal/ui/model/chat.go141
LOWinternal/cmd/run.go301// streaming SSE events into a final, complete stdout for `crush run`.
LOWinternal/cmd/run.go361 s.read[msg.ID] = len(content)
LOWinternal/cmd/root.go161// copied from cobra:
LOWinternal/cmd/clientserverrace/race_test.go21 "sync/atomic"
LOWinternal/config/resolve.go81//
LOWinternal/config/resolve.go101 if err != nil {
LOWinternal/config/config.go101 // The original API key template before resolution (for re-resolution on auth errors).
LOWinternal/config/config.go321 }
LOWinternal/config/config.go361 return nil, fmt.Errorf("arg %d: %w", i, err)
LOWinternal/config/config.go381 return "", nil
LOWinternal/config/config.go421 if v == "" {
LOWinternal/config/config.go461// sanitized by ResolveValue and is wrapped with %w so errors.Is/As
LOWinternal/shell/dispatch_windows_test.go1//go:build windows
LOWinternal/shell/run.go21// a shell alias.
LOWinternal/shell/run.go41 // each command reaches the exec layer. nil disables blocking entirely.
LOWinternal/shell/dispatch.go21)
LOWinternal/shell/doc.go1package shell
LOWinternal/shell/doc.go21// shell := shell.NewShell(nil)
LOWinternal/shell/jq.go201// - between readers (before opening the next file / consuming stdin);
49 more matches not shown…
Hallucination Indicators7 hits · 85 pts
SeverityFileLineSnippet
CRITICALinternal/ui/dialog/filepicker.go226 innerWidth := width - f.com.Styles.Dialog.View.GetHorizontalFrameSize()
CRITICALinternal/ui/dialog/filepicker.go227 imgPrevHeight := filePickerMinHeight*2 - f.com.Styles.Dialog.ImagePreview.GetVerticalFrameSize()
CRITICALinternal/ui/dialog/filepicker.go228 imgPrevWidth := innerWidth - f.com.Styles.Dialog.ImagePreview.GetHorizontalFrameSize()
CRITICALinternal/ui/dialog/quit.go114 view := q.com.Styles.Dialog.Quit.Frame.Render(content)
CRITICALinternal/ui/dialog/models_item.go49 configuredText := m.t.Dialog.Models.ConfiguredText.Render("Configured")
CRITICALinternal/ui/dialog/commands.go286 innerWidth := width - c.com.Styles.Dialog.View.GetHorizontalFrameSize()
CRITICALinternal/ui/model/status.go73 helpView := s.com.Styles.Status.Help.Render(s.help.View(s.helpKm))
Fake / Example Data9 hits · 10 pts
SeverityFileLineSnippet
LOWinternal/agent/agent_test.go264 Prompt: "fetch the content from https://example-files.online-convert.com/website/html/example.html and tel
LOW…ent/testdata/TestCoderAgent/glm-5.1/download_tool.yaml770 The names "John Doe" for males, "Jane Doe" or "Jane Roe" for females, or "Jonnie Doe" and "Janie Doe" for children
LOW…ent/testdata/TestCoderAgent/glm-5.1/download_tool.yaml770 The names "John Doe" for males, "Jane Doe" or "Jane Roe" for females, or "Jonnie Doe" and "Janie Doe" for children
LOW…ent/testdata/TestCoderAgent/glm-5.1/download_tool.yaml774 Similarly, a child or baby whose identity is unknown may be referred to as Baby Doe. A notorious murder case in Ka
LOW…/agent/testdata/TestCoderAgent/glm-5.1/fetch_tool.yaml11 body: '{"messages":[{"content":"You will generate a short title based on the first message a user begins a conversat
LOW…/agent/testdata/TestCoderAgent/glm-5.1/fetch_tool.yaml349 body: "{\"messages\":[{\"content\":\"You are Crush, a powerful AI Assistant that runs in the CLI.\\n\\n<critical_rul
LOW…/agent/testdata/TestCoderAgent/glm-5.1/fetch_tool.yaml507 The names "<b>John Doe</b>" for males, "<b>Jane Doe</b>" or "<b>Jane Roe</b>" for females, or "<b>Jonnie Doe</b>"
LOW…/agent/testdata/TestCoderAgent/glm-5.1/fetch_tool.yaml511 <p>Similarly, a child or baby whose identity is unknown may be referred to as <b>Baby Doe</b>. A notorious murder
LOW…/agent/testdata/TestCoderAgent/glm-5.1/fetch_tool.yaml540 body: "{\"messages\":[{\"content\":\"You are Crush, a powerful AI Assistant that runs in the CLI.\\n\\n<critical_rul
AI Slop Vocabulary3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMinternal/ui/chat/assistant_thinking_window_test.go107 // any future style-driven padding so the test is robust to
MEDIUMinternal/shell/dispatch_test.go309// if bash isn't available (rare in CI, but keep the test robust).
MEDIUMinternal/shell/dispatch.go82// on the raw string to stay robust if a future change ever bypasses that