fix(gen): use standard comment format in generated code - #25
Open
ardnew wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the header comments in generated Go code templates to comply with the official Go standard format for generated code markers. The change ensures that linters, formatters, and IDEs properly recognize the generated files.
- Standardizes all generated code headers to follow the pattern
^// Code generated .* DO NOT EDIT\.$ - Removes package-specific references and trailing spaces from the old format
- Ensures consistency across all code generation templates in the project
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| gen/golang/token/token.go | Updates token package generation template header to use standard format |
| gen/golang/lexer/lexer.go | Updates lexer package generation template header to use standard format |
| gen/golang/gll/symbols/symbols.go | Updates symbols package generation template header to use standard format |
| gen/golang/gll/sppf/sppf.go | Updates SPPF package generation template header to use standard format |
| gen/golang/gll/slots/slots.go | Updates slots package generation template header and removes trailing space |
| gen/golang/gll/parser.go | Updates parser package generation template header to use standard format |
| gen/golang/gll/bsr/bsr.go | Updates BSR package generation template header to use standard format |
All changes correctly implement the Go standard format for generated code markers. The new format // Code generated by gogll. DO NOT EDIT. matches the required regular expression pattern and will be properly recognized by tooling. No issues found.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ardnew
force-pushed
the
fix/gen-comment
branch
from
December 30, 2025 19:37
b890a30 to
67c2551
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated Go code is not recognized correctly by various linters, formatters, and IDEs because they are using a non-standard format in the header comment.
Per documentation from
go help generate: