reduce cognitive complexity in production functions flagged by go:S3776 #71

Closed
opened 2026-10-19 15:26:43 +02:00 by pti · 1 comment
Owner

Sonar go:S3776 flags 50 production functions above complexity 15. Worst first: internal/mcptools/cli_source.go at 55, internal/doctor/doctor.go at 39, internal/config/edit.go at 39, internal/pool/gc.go at 37, internal/pool/orchestrator.go with five functions between 28 and 36, internal/mcptools/request_tool.go at 36, internal/introspect/parser_git.go at 36 and 27, cmd/harness.go at 34, cmd/up.go at 32, internal/doctor/suppress.go at 30, internal/pool/source/npm.go at 27. After the threshold moves to 25 per the sonar config issue, about 37 remain. Work one package per PR, extract helpers, no behaviour change, whole-branch review per .claude/agents/README.md since these touch policy and pool code. Order: mcptools first, then config and doctor, then pool, then cmd. Part of the SonarQube cleanup tracking issue.

Sonar go:S3776 flags 50 production functions above complexity 15. Worst first: internal/mcptools/cli_source.go at 55, internal/doctor/doctor.go at 39, internal/config/edit.go at 39, internal/pool/gc.go at 37, internal/pool/orchestrator.go with five functions between 28 and 36, internal/mcptools/request_tool.go at 36, internal/introspect/parser_git.go at 36 and 27, cmd/harness.go at 34, cmd/up.go at 32, internal/doctor/suppress.go at 30, internal/pool/source/npm.go at 27. After the threshold moves to 25 per the sonar config issue, about 37 remain. Work one package per PR, extract helpers, no behaviour change, whole-branch review per .claude/agents/README.md since these touch policy and pool code. Order: mcptools first, then config and doctor, then pool, then cmd. Part of the SonarQube cleanup tracking issue.
Author
Owner

closed

closed
pti closed this issue 2026-10-19 22:38:41 +02:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pti/wraptool#71
No description provided.