Repository navigation
Closed
Labels
Description
Summary
make golint-custom reported a non-shared function-length finding in pkg/parser/schema_suggestions.go.
Finding
pkg/parser/schema_suggestions.go:539—extractNestedYAMLValue is 73 lines long (limit: 60); consider breaking it up
Expected outcome
Refactor extractNestedYAMLValue into smaller helpers while preserving YAML extraction behavior and existing caller contracts.
Remediation checklist
- Keep the change scoped to
pkg/parser/schema_suggestions.go. - Prefer minimal helper extraction over behavioral rewrites.
- Preserve existing parsing edge cases and error behavior.
- Run
make golint-customand confirm this finding is gone.
Copilot instructions
- Split
extractNestedYAMLValueinto a few small private helpers with clear responsibilities. - Do not change unrelated parser behavior or surrounding APIs.
- Validate the file by running
make golint-custom.
Generated by 🧌 LintMonster · gpt54 · 29.9 AIC · ⌖ 4.17 AIC · ⊞ 5.7K · ◷
- expires on Aug 19, 2026, 7:23 PM UTC-08:00
Summary
make golint-custom reports one non-shared custom-lint finding: EnforceSafeUpdate exceeds the parameter-count limit.
Finding
pkg/workflow/safe_update_enforcement.go:53—EnforceSafeUpdate has 9 parameters (limit: 8); consider using an options struct
Expected outcome
Refactor EnforceSafeUpdate to reduce its parameter count, preferably by introducing a small options/request struct or grouping related inputs, without changing call-site behavior.
Remediation checklist
- Keep the change scoped to
pkg/workflow/safe_update_enforcement.goand its direct call sites. - Prefer a minimal options/request struct over broader API redesign.
- Preserve existing behavior and error handling.
- Run
make golint-customand confirm this finding is gone.
Copilot instructions
- Introduce the smallest structure needed to bring
EnforceSafeUpdateto 8 parameters or fewer. - Update only direct callers affected by the signature change.
- Avoid unrelated cleanup.
- Validate with
make golint-custombefore finishing.> Generated by 🧌 LintMonster · gpt54 · 25.3 AIC · ⌖ 4.17 AIC · ⊞ 5.7K · ◷
Reacted by Copilot
Activity