Summary
Daily custom-lint scan found 4 targeted issues in resource lifecycle and context propagation handling. These are small, high-signal fixes and should be remediated with minimal edits.
Findings
pkg/workflow/action_resolver.go: defer cancel immediately after context.WithCancel/WithTimeout/WithDeadline
pkg/workflow/safe_outputs_actions.go: avoid defer inside a loop when the resource must close per iteration
pkg/parser/remote_fetch.go: use exec.CommandContext(ctx, ...) instead of exec.Command
pkg/cli/token_usage.go: defer file Close() immediately after successful open
Expected outcome
- Custom linter warnings for these four findings are eliminated
- No behavior changes beyond correct lifecycle/cancellation semantics
Remediation checklist
Copilot instructions
Use minimal, targeted code edits. Do not address unrelated lint findings. Validate with make golint-custom before finishing.
Generated by 🧌 LintMonster · 58.4 AIC · ⌖ 1.77 AIC · ⊞ 4.2K · ◷
Summary
Daily custom-lint scan found 4 targeted issues in resource lifecycle and context propagation handling. These are small, high-signal fixes and should be remediated with minimal edits.
Findings
pkg/workflow/action_resolver.go: defer cancel immediately aftercontext.WithCancel/WithTimeout/WithDeadlinepkg/workflow/safe_outputs_actions.go: avoiddeferinside a loop when the resource must close per iterationpkg/parser/remote_fetch.go: useexec.CommandContext(ctx, ...)instead ofexec.Commandpkg/cli/token_usage.go: defer fileClose()immediately after successful openExpected outcome
Remediation checklist
exec.Command(...)withexec.CommandContext(ctx, ...)where the diagnostic points to context-aware executionmake golint-customand stop once this group is cleanCopilot instructions
Use minimal, targeted code edits. Do not address unrelated lint findings. Validate with
make golint-custombefore finishing.