Skip to content

Add @generated to parser.c header#4338

Merged
clason merged 1 commit intotree-sitter:masterfrom
edgarogh:at-generated
Apr 8, 2025
Merged

Add @generated to parser.c header#4338
clason merged 1 commit intotree-sitter:masterfrom
edgarogh:at-generated

Conversation

@edgarogh
Copy link
Contributor

@edgarogh edgarogh commented Apr 7, 2025

This is a spontaneous PR, it's so ridiculously small that opening an issue would've been a waste of time. You can close it without justification if this seems useless.

This 1-character commit makes parser.c follow the https://generated.at/ convention for generated files. This potentially allows any compatible IDE to discourage editing it directly. I see that you're already using .gitattributes to mark these files are generated; this has the same goal, but for a different kind of consumers.

I only added this to parser.c as this is the file most likely to be edited accidentally, and it already had a comment with the literal word "generated" in it. I can add it to more files if deemed useful.

@clason clason added the ci:backport release-0.25 Backport label label Apr 8, 2025
@clason clason merged commit 52d2865 into tree-sitter:master Apr 8, 2025
19 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 8, 2025
This makes `parser.c` follow the https://generated.at/ convention for generated files. This potentially allows any compatible IDE to discourage editing it directly.

(cherry picked from commit 52d2865)
@tree-sitter-ci-bot
Copy link

Successfully created backport PR for release-0.25:

clason pushed a commit that referenced this pull request Apr 8, 2025
This makes `parser.c` follow the https://generated.at/ convention for generated files. This potentially allows any compatible IDE to discourage editing it directly.

(cherry picked from commit 52d2865)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants