Summary
Refactor parser infrastructure in pkg/parser/ and pkg/actionpins/ to eliminate ~900 lint findings related to excessive function line length (>60 lines). The parser is the most complex subsystem with functions exceeding 400+ lines.
Affected Packages
- pkg/parser/ - ~50+ functions with excessive line length (62-599 lines), many in MCP, import, and include processing
- pkg/actionpins/ - 1+ function with excessive line length
Critical Long Functions (Priority Order)
pkg/parser/frontmatter_extraction_yaml.go:107 - commentOutProcessedFieldsInOnSection is 599 lines (LARGEST)
pkg/parser/schedule_fuzzy_scatter.go:184 - ScatterSchedule is 441 lines
pkg/parser/import_bfs.go:21 - processImportsFromFrontmatterWithManifestAndSource is 492 lines
pkg/parser/schedule_parser.go:300 - parseBase is 207 lines
pkg/parser/schedule_parser.go:93 - parseInterval is 203 lines
pkg/parser/mcp.go:484 - ParseMCPConfig is 253 lines
pkg/parser/mcp.go:255 - processBuiltinMCPTool is 225 lines
pkg/parser/schema_compiler.go:340 - validateWithSchemaAndLocation is 165 lines
pkg/parser/import_field_extractor.go:152 - prepareFrontmatter is 123 lines
pkg/parser/remote_fetch.go:262 - downloadIncludeFromWorkflowSpec is 101 lines
And 40+ additional functions ranging 62-100+ lines.
Remediation Strategy
Phase 1: Ultra-Long Functions (>250 lines)
Phase 2: Long Functions (100-250 lines)
Phase 3: Moderate Functions (60-100 lines)
Validation
Important Notes
- Parser functions have complex logic; decomposition requires careful testing
- Maintain existing error messages and validation boundaries
- Extract helpers should have clear, single responsibility
- Use file suffixes (e.g.,
_helpers.go) for extracted utility functions if creating new files
Success Criteria
✅ All lint findings in pkg/parser/ and pkg/actionpins/ resolved
✅ All unit tests pass
✅ Workflow compilation still works correctly
✅ No regression in parser behavior
Generated by 🧌 LintMonster · ● 573.9K · ◷
Summary
Refactor parser infrastructure in
pkg/parser/andpkg/actionpins/to eliminate ~900 lint findings related to excessive function line length (>60 lines). The parser is the most complex subsystem with functions exceeding 400+ lines.Affected Packages
Critical Long Functions (Priority Order)
pkg/parser/frontmatter_extraction_yaml.go:107-commentOutProcessedFieldsInOnSectionis 599 lines (LARGEST)pkg/parser/schedule_fuzzy_scatter.go:184-ScatterScheduleis 441 linespkg/parser/import_bfs.go:21-processImportsFromFrontmatterWithManifestAndSourceis 492 linespkg/parser/schedule_parser.go:300-parseBaseis 207 linespkg/parser/schedule_parser.go:93-parseIntervalis 203 linespkg/parser/mcp.go:484-ParseMCPConfigis 253 linespkg/parser/mcp.go:255-processBuiltinMCPToolis 225 linespkg/parser/schema_compiler.go:340-validateWithSchemaAndLocationis 165 linespkg/parser/import_field_extractor.go:152-prepareFrontmatteris 123 linespkg/parser/remote_fetch.go:262-downloadIncludeFromWorkflowSpecis 101 linesAnd 40+ additional functions ranging 62-100+ lines.
Remediation Strategy
Phase 1: Ultra-Long Functions (>250 lines)
commentOutProcessedFieldsInOnSection(599 lines):Phase 2: Long Functions (100-250 lines)
Phase 3: Moderate Functions (60-100 lines)
Validation
make golint-customand confirm zero errors inpkg/parser/andpkg/actionpins/go test -v ./pkg/parser/... ./pkg/actionpins/..../gh-aw compile <test-workflow.md>make agent-report-progress(build + fmt + lint + test-unit) before commitImportant Notes
_helpers.go) for extracted utility functions if creating new filesSuccess Criteria
✅ All lint findings in
pkg/parser/andpkg/actionpins/resolved✅ All unit tests pass
✅ Workflow compilation still works correctly
✅ No regression in parser behavior