Skip to content

refactor(cli): make getServiceProviders funlen-proof (unblocks new-service PRs)#2239

Merged
agbishop merged 1 commit into
mainfrom
fix/getserviceproviders-funlen
Jun 13, 2026
Merged

refactor(cli): make getServiceProviders funlen-proof (unblocks new-service PRs)#2239
agbishop merged 1 commit into
mainfrom
fix/getserviceproviders-funlen

Conversation

@agbishop

Copy link
Copy Markdown
Collaborator

Problem

Every new-service PR (#2232 #2235 #2236 #2238) fails CI lint identically:

cli.go: Function 'getServiceProviders' is too long (101 > 100) (funlen)

Each new service appends to the inline slice in getServiceProviders, overflowing the funlen limit. Polecats kept fixing their service files, missing the real cause in shared cli.go.

Fix

Extract the 11 foundational providers into getCoreServiceProviders(); body becomes getRemainingServiceProviders(). Tail + chain untouched so in-flight service PRs rebase cleanly.

  • getServiceProviders: 6 lines · getRemainingServiceProviders: 93 lines (headroom)
  • New services should register in getMostRecentServiceProviders() (chain tail)
  • go build ./... clean, goimports applied

After merge, rebase #2232/#2235/#2236/#2238 — funlen clears.

🤖 Generated with Claude Code

Extract the foundational providers into getCoreServiceProviders so the
inline registration list stays under the 100-line funlen limit. New
services register in getMostRecentServiceProviders (chain tail). Unblocks
new-service PRs that all tripped the same shared-cli.go funlen error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@agbishop agbishop enabled auto-merge (squash) June 13, 2026 05:05
@agbishop

Copy link
Copy Markdown
Collaborator Author

📊 Code Coverage Report

Metric Value Status
Total Coverage 0.0%
82.7%
New Code Coverage N/A (0/0 stmts)

Tip

This project maintains a minimum coverage threshold of 85%. Maintain or improve coverage on new code to ensure long-term stability.


Last updated: Sat, 13 Jun 2026 05:24:23 GMT

@agbishop agbishop merged commit aa5ab9a into main Jun 13, 2026
26 checks passed
@agbishop agbishop deleted the fix/getserviceproviders-funlen branch June 13, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant