Skip to content

[lint-monster] parser helper function-length cleanup #52405

Description

@github-actions

Summary

make golint-custom reported a non-shared function-length finding in pkg/parser/schema_suggestions.go.

Finding

  • pkg/parser/schema_suggestions.go:539extractNestedYAMLValue 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-custom and confirm this finding is gone.

Copilot instructions

  1. Split extractNestedYAMLValue into a few small private helpers with clear responsibilities.
  2. Do not change unrelated parser behavior or surrounding APIs.
  3. 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:53EnforceSafeUpdate 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.go and its direct call sites.
  • Prefer a minimal options/request struct over broader API redesign.
  • Preserve existing behavior and error handling.
  • Run make golint-custom and confirm this finding is gone.

Copilot instructions

  1. Introduce the smallest structure needed to bring EnforceSafeUpdate to 8 parameters or fewer.
  2. Update only direct callers affected by the signature change.
  3. Avoid unrelated cleanup.
  4. Validate with make golint-custom before finishing.> Generated by 🧌 LintMonster · gpt54 · 25.3 AIC · ⌖ 4.17 AIC · ⊞ 5.7K ·

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions