Summary
12 findings across 3 categories:
- 8 functions with >8 parameters (should use options struct)
- 2 context.Background() calls (should use passed context parameter)
- 2 os.Exit() calls in library package (should move to cmd/ entry-point)
Detailed Findings
Functions with >8 Parameters (8 findings)
Each should use an options struct:
/home/runner/work/gh-aw/gh-aw/pkg/workflow/compiler_safe_outputs_job.go:382: buildSafeOutputsJobFromParts has 9 parameters
/home/runner/work/gh-aw/gh-aw/pkg/workflow/maintenance_workflow.go:120: GenerateMaintenanceWorkflow has 9 parameters
/home/runner/work/gh-aw/gh-aw/pkg/workflow/maintenance_workflow_yaml.go:16: buildMaintenanceWorkflowYAML has 12 parameters
/home/runner/work/gh-aw/gh-aw/pkg/workflow/mcp_rendering.go:94: renderStandardJSONMCPConfig has 9 parameters
/home/runner/work/gh-aw/gh-aw/pkg/workflow/mcp_setup_generator.go:618: writeMCPGatewayExports has 12 parameters
/home/runner/work/gh-aw/gh-aw/pkg/workflow/mcp_setup_generator.go:668: buildMCPGatewayContainerCommand has 9 parameters
/home/runner/work/gh-aw/gh-aw/pkg/workflow/side_repo_maintenance.go:93: generateAllSideRepoMaintenanceWorkflows has 10 parameters
/home/runner/work/gh-aw/gh-aw/pkg/workflow/side_repo_maintenance.go:157: generateSideRepoMaintenanceWorkflow has 10 parameters
context.Background() Violations (2 findings)
Should use the passed context parameter instead:
/home/runner/work/gh-aw/gh-aw/pkg/workflow/action_resolver.go:33: use the context.Context parameter instead of context.Background()
/home/runner/work/gh-aw/gh-aw/pkg/cli/docker_images.go:55: use the context.Context parameter instead of context.Background()
os.Exit() in Library Package (2 findings)
Should be moved to cmd/ entry-point or wrapped in a way that allows testing:
/home/runner/work/gh-aw/gh-aw/pkg/cli/upgrade_command.go:201: os.Exit called in library package github.com/github/gh-aw/pkg/cli
/home/runner/work/gh-aw/gh-aw/pkg/cli/upgrade_command.go:399: os.Exit called in library package github.com/github/gh-aw/pkg/cli
Expected Outcome
All 12 findings resolved:
- Parameter count violations use options structs
- context.Background() replaced with context parameter
- os.Exit() violations removed from library packages
Remediation Checklist
For Parameter Count Issues
For context.Background() Issues
For os.Exit() Issues
Final Validation
Notes
- Options struct pattern is already used in codebase; follow existing conventions
- Context parameter should always be the first parameter of a function
- Library packages should not call os.Exit() - let callers decide on exit codes
Generated by 🧌 LintMonster · ● 413.8K · ◷
Summary
12 findings across 3 categories:
Detailed Findings
Functions with >8 Parameters (8 findings)
Each should use an options struct:
context.Background() Violations (2 findings)
Should use the passed context parameter instead:
os.Exit() in Library Package (2 findings)
Should be moved to cmd/ entry-point or wrapped in a way that allows testing:
Expected Outcome
All 12 findings resolved:
Remediation Checklist
For Parameter Count Issues
BuildSafeOutputsJobOptions)make buildFor context.Background() Issues
context.Background()withctxFor os.Exit() Issues
Final Validation
make golint-custom 2>&1 | grep -E 'parameters|context.Background|os.Exit'(should be empty)make buildgo test -v ./pkg/workflow ./pkg/cli ./pkg/...(selective tests)Notes