fix: resolve CI lint failures blocking investigate-jsonschema-constraint branch#563
Conversation
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
…dispatch_test.go Agent-Logs-Url: https://github.com/GoCodeAlone/workflow/sessions/79fd7d0b-6586-494b-8f40-ee19def1afa9 Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR resolves two CI lint failures encountered while investigating stricter JSON Schema additionalProperties: false enforcement in the plugin SDK manifest schema, without changing runtime behavior.
Changes:
- Reworded two comments in the IaC codemod refactor to avoid gocritic’s
commentedOutCodefalse-positive ongenerates:(parsed as a Go label). - Removed duplicated
specs -> []string{name}logic in an infra provider dispatch test by reusing an existingspecNameshelper, eliminating anunusedlinter violation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cmd/iac-codemod/refactor_plan.go | Rephrases “generates:” comments to prose to avoid gocritic label parsing. |
| cmd/wfctl/infra_provider_dispatch_test.go | Uses specNames(specs) helper in both plan/apply seams to remove duplication and fix unused-helper linting. |
|
@copilot resolve the merge conflicts in this pull request |
…sonschema-constraint # Conflicts: # cmd/iac-codemod/refactor_plan.go Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Merge conflicts resolved in |
| planCalls = append(planCalls, capturedPlanCall{provType: currentProvType, specNames: specNames(specs)}) | ||
| return interfaces.IaCPlan{}, nil |
Surfaced during investigation of
additionalProperties: falseenforcement in the plugin SDK manifest schema (jsonschema/v6does honor the constraint — all regression tests inplugin/sdk/manifest_test.gopass). Two unrelated lint errors were blocking CI on this branch.Changes
cmd/iac-codemod/refactor_plan.go— Rephrased two// generates: <stmt>comments that gocritic'scommentedOutCodecheck was flagging:generates:is a valid Go label, making the comment parse as a labeled statement. Changed to prose descriptions.cmd/wfctl/infra_provider_dispatch_test.go— ThespecNameshelper was defined but never called; the plan-path and apply-path closures each inlined an equivalentmake/forloop. Replaced both inline loops withspecNames(specs), eliminating the duplication and satisfying theunusedlinter.