Summary
The pkg/workflow and pkg/actionpins packages contain approximately 300+ functions exceeding the 60-line limit. These should be broken down into smaller, more testable units.
Affected Functions (Sample - See full list in logs)
pkg/workflow (290+ functions)
claude_engine.go:120 — GetExecutionSteps (373 lines)
claude_logs.go:145 — parseClaudeJSONLog (185 lines)
claude_tools.go:168 — computeAllowedClaudeToolsString (360 lines)
codex_engine.go:146 — GetExecutionSteps (286 lines)
command.go:16 — buildEventAwareCommandCondition (187 lines)
compiler.go:121 — generateAndValidateYAML (120 lines)
compiler.go:382 — CompileWorkflowData (150 lines)
compiler_main_job.go:26 — buildMainJob (372 lines)
compiler_orchestrator_engine.go:35 — setupEngineAndImports (391 lines)
compiler_orchestrator_frontmatter.go:37 — parseFrontmatterSection (162 lines)
- And 280+ more functions (including test files with long table-driven tests)
pkg/actionpins (10+ functions)
actionpins.go:303 — ResolveActionPin (105 lines)
Refactoring Strategy
- Analyze call graphs — Understand which functions can be split independently
- Extract core logic — Separate validation, parsing, and generation phases
- Create domain helpers — Group related operations (e.g., engine setup, job building)
- Preserve public APIs — Only break internal/private functions
- Test coverage — Ensure all new helpers have unit tests
Note on Test Functions
Long test functions (table-driven tests with many cases) are acceptable when they test a single behavior exhaustively. Prioritize fixing production code first; flag excessively long test functions for secondary review.
Validation
Run make golint-custom after refactoring to verify all violations are resolved.
Expected Outcome
All functions in pkg/workflow and pkg/actionpins reduced to ≤60 lines without functional changes.
Zero new lint errors introduced.
Generated by 🧌 LintMonster · ● 77.9K · ◷
Summary
The
pkg/workflowandpkg/actionpinspackages contain approximately 300+ functions exceeding the 60-line limit. These should be broken down into smaller, more testable units.Affected Functions (Sample - See full list in logs)
pkg/workflow (290+ functions)
claude_engine.go:120— GetExecutionSteps (373 lines)claude_logs.go:145— parseClaudeJSONLog (185 lines)claude_tools.go:168— computeAllowedClaudeToolsString (360 lines)codex_engine.go:146— GetExecutionSteps (286 lines)command.go:16— buildEventAwareCommandCondition (187 lines)compiler.go:121— generateAndValidateYAML (120 lines)compiler.go:382— CompileWorkflowData (150 lines)compiler_main_job.go:26— buildMainJob (372 lines)compiler_orchestrator_engine.go:35— setupEngineAndImports (391 lines)compiler_orchestrator_frontmatter.go:37— parseFrontmatterSection (162 lines)pkg/actionpins (10+ functions)
actionpins.go:303— ResolveActionPin (105 lines)Refactoring Strategy
Note on Test Functions
Long test functions (table-driven tests with many cases) are acceptable when they test a single behavior exhaustively. Prioritize fixing production code first; flag excessively long test functions for secondary review.
Validation
Run
make golint-customafter refactoring to verify all violations are resolved.Expected Outcome
All functions in
pkg/workflowandpkg/actionpinsreduced to ≤60 lines without functional changes.Zero new lint errors introduced.