Repo X-Ray · 05 December 2026, 05:37 · read in 0.3s · nothing was executed

cobra

/srv/xela/workspace/.xray-oss/cobra

How to run itWhat the code isWhere the risk isWhat the tests cannot seeDead weightDependenciesSecretsMethod and limits
16,765
lines of code
19
source files
17
test files
100%
modules a test can reach
404
commits read
4 months ago
last commit

How to run it

make targets

What the code is

LanguageFilesLines
Go3616,765

What to read first

Go files in the same package do not import one another, so there is no import route to trace. Read the package list instead.

The modules everything else leans on

Imported by the most files: the load-bearing walls, where a change reaches furthest.

ModuleImported byLinesA test reaches it
active_help.go1260yes
active_help_test.go12400no
args.go12144yes
args_test.go12578no
bash_completions.go12709yes
bash_completionsV2.go12484yes
bash_completionsV2_test.go1233no
bash_completions_test.go12289no
cobra.go12246yes
command.go122,072yes
command_notwin.go1220yes
command_test.go122,954no

Where the risk is

Churn multiplied by size. A big file that never changes is usually fine; a big file that changes constantly is where the bugs and the arguments live.

FileCommitsLinesMostly written byTested
command.go712,072Author A 18%yes
completions.go471,024Author A 30%yes
bash_completions.go27709Author A 33%yes
bash_completionsV2.go22484Author D 50%yes
powershell_completions.go19350Author J 21%yes
fish_completions.go15292Author A 40%yes
zsh_completions.go14308Author A 29%yes
cobra.go12246Author C 25%yes
doc/man_docs.go10246Author C 30%yes
flag_groups.go8290Author C 25%yes
args.go11144Author C 27%yes
doc/md_docs.go10158Author C 20%yes

The busiest test file is command_test.go (43 commits) - kept out of the table above so the code that ships comes first.

History read: 404 commits, 7 years ago to 4 months ago. Top committer overall: Author A 12%.

What the tests cannot see

14 of 14 shipped modules are reachable from a test file by import (100%).

Reachable means a test imports it, directly or through another module. It is the floor, not coverage: a module can be reachable and still have none of its behaviour exercised. The modules below are the other case - nothing a test loads can even see them, so a green suite says nothing about them.

Every source module is reachable from the tests.

Dead weight

Nothing unreachable found.

11 TODO / FIXME / HACK markers

FileCount
CONDUCT.md3
cobra.go3
completions_test.go2
CONTRIBUTING.md1
command.go1
command_test.go1

Dependencies

Read from go.mod.

Declared but never imported

Dead weight in the install, or a tool that is run rather than imported (formatters, type stubs, test plugins). Check before removing.

github.com/cpuguy83/go-md2man/v2 go.yaml.in/yaml/v3 (

Missing, but only for tests, docs or examples

Nothing in the shipped code imports these, so an install will not break - but a fresh contributor running the tests or building the docs will hit them.

github.com/cpuguy83/go-md2man go.yaml.in

Secrets

No committed credentials matched the patterns checked.

Patterns covered: AWS keys, private key blocks, GitHub, Slack, Stripe, Google, OpenAI and Anthropic keys, JSON web tokens, and passwords assigned in code. A secret in a format not listed here would not be found, and this does not read the git history.

Method and limits

More measured notes on coding agents: alexenabled.github.io