• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ronelliott / snek / 23676774764
97%
master: 94%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 28 Mar 2026 03:46AM UTC
Jobs 1
Files 6
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Mar 2026 03:45AM UTC coverage: 97.118% (-0.5%) from 97.57%
23676774764

push

github

web-flow
Fix root command with subcommands rejecting positional args (#6)

* Fix root command with subcommands rejecting positional args

When a root command had both a Run/RunE handler and subcommands, cobra's
legacyArgs validation in Find() would reject any positional arguments
with an "unknown command" error. Auto-apply ArbitraryArgs on the root
command when no custom Args validator has been set to restore expected
behavior.

Also replace cobra.OnInitialize with PersistentPreRunE for logging setup.
cobra.OnInitialize appends to a package-level global, causing initializers
to accumulate across multiple Run() calls (e.g. in tests). PersistentPreRunE
scopes the hook to the command tree and propagates errors through Execute()
instead of calling os.Exit(1) directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Address Copilot review comments

- Fix PersistentPreRunE chaining: when both existingPreRunE and
  existingPreRun are set, both now run. Previously existingPreRunE's
  early return skipped existingPreRun entirely.
- Redirect log output to io.Discard in the three new execution tests
  so they don't emit "Logging initialized." to stdout during the test run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

13 of 20 new or added lines in 1 file covered. (65.0%)

775 of 798 relevant lines covered (97.12%)

10.55 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
82.67
-2.08% run.go
Jobs
ID Job ID Ran Files Coverage
1 23676774764.1 28 Mar 2026 03:46AM UTC 6
97.12
GitHub Action Run
Source Files on build 23676774764
  • Tree
  • List 6
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9b7c8b00 on github
  • Prev Build on main (#23224579366)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc