Skip to content

[code-simplifier] refactor: fix orphaned comments in schema_validation.go - #19100

Merged
pelikhan merged 2 commits into
mainfrom
code-simplifier/fix-orphaned-comments-68ac4555d893cb9b
Mar 1, 2026
Merged

[code-simplifier] refactor: fix orphaned comments in schema_validation.go#19100
pelikhan merged 2 commits into
mainfrom
code-simplifier/fix-orphaned-comments-68ac4555d893cb9b

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

This PR fixes orphaned comments in pkg/parser/schema_validation.go introduced via the PR #18906 (which added debug logging to the file).

Files Simplified

  • pkg/parser/schema_validation.go — Removed two stale orphaned comments that referenced old function names; merged the detailed description block into the proper Go doc comment

Improvements Made

Removed orphaned/stale comments:

Before the fix, there were two disconnected comment blocks:

  1. A 9-line block labeled // ValidateMainWorkflowFrontmatterWithSchema validates... (old function name) was separated from the actual function by a blank line, making it a floating orphan rather than a Go doc comment. Immediately below it was a single-line doc comment for the renamed function ValidateMainWorkflowFrontmatterWithSchemaAndLocation.

  2. A stale single-line comment // ValidateIncludedFileFrontmatterWithSchema validates... (old function name) was followed by a blank line, disconnecting it from the actual function ValidateIncludedFileFrontmatterWithSchemaAndLocation.

These orphaned comments referenced function names that no longer exist, which is misleading when navigating or using go doc.

After the fix:

  • The detailed description block is now a proper Go doc comment attached directly to ValidateMainWorkflowFrontmatterWithSchemaAndLocation
  • The stale ValidateIncludedFileFrontmatterWithSchema reference is removed
  • No behavior changes — only comment cleanup

Changes Based On

Recent changes from:

Testing

  • ✅ All parser validation tests pass (go test -run "TestValidate.*" ./pkg/parser/)
  • ✅ Formatting passes (make fmt)
  • ✅ No functional changes — behavior is identical

Review Focus

Please verify:

  • The detailed description (schema validation coverage info) is now properly attached as a doc comment to ValidateMainWorkflowFrontmatterWithSchemaAndLocation
  • No stale references to old function names remain

Automated by Code Simplifier Agent — analyzing code from the last 24 hours

Generated by Code Simplifier

  • expires on Mar 2, 2026, 6:57 PM UTC

Remove stale comments referencing old function names
(ValidateMainWorkflowFrontmatterWithSchema and
ValidateIncludedFileFrontmatterWithSchema) that were disconnected
from their renamed counterparts. Merge the detailed description block
into the proper doc comment for ValidateMainWorkflowFrontmatterWithSchemaAndLocation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan merged commit e16430e into mainMar 1, 2026
48 checks passed
@pelikhan
pelikhan deleted the code-simplifier/fix-orphaned-comments-68ac4555d893cb9b branch March 1, 2026 20:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@pelikhan