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

stacklok / toolhive / 18496289564

14 Oct 2025 12:20PM UTC coverage: 46.675% (+0.03%) from 46.644%
18496289564

push

github

web-flow
Refactor buildRunnerConfig to reduce cyclomatic complexity (#2186)

* Refactor buildRunnerConfig to reduce cyclomatic complexity

Extract middleware configuration and remote authentication logic into
separate helper functions to reduce the cyclomatic complexity of
buildRunnerConfig from 16 to below the gocyclo threshold of 15.

Changes:
- Add configureMiddlewareAndOptions helper function to handle middleware
  setup, authorization config loading, and environment file processing
- Add configureRemoteAuth helper function to handle remote server
  metadata and direct remote URL authentication configuration
- Maintain all existing functionality while improving code organization

Fixes linter error: "cyclomatic complexity 16 of func buildRunnerConfig
is high (> 15)"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* Fix runFlags parameter passing in getRemoteAuthFromRemoteServerMetadata

Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>

---------

Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Radoslav Dimitrov <radoslav@stacklok.com>

0 of 39 new or added lines in 1 file covered. (0.0%)

6 existing lines in 3 files now uncovered.

17575 of 37654 relevant lines covered (46.67%)

16.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.62
/pkg/transport/proxy/httpsse/http_proxy.go


Source Not Available

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