eiffel-community / eiffelevents-sdk-go

A Go SDK for working with Eiffel events
Apache License 2.0
1 stars 2 forks source link

Generated files should have conventional file header #96

Open magnusbaeck opened 1 month ago

magnusbaeck commented 1 month ago

Description

The files we generate have a comment right after the copyright block:

// THIS FILE IS AUTOMATICALLY GENERATED AND MUST NOT BE EDITED BY HAND.

This is fine, but the go generate conventions call for something else:

// Code generated <optional text> DO NOT EDIT.

gopls and other tools detect this and are, for example, able to warn the user.

Additional Context

No response

Logs

No response

Expected Behavior

I expect the SDK to follow established standard and conventions for Go code.

Steps To Reproduce

No response

The version of this project/repo, if applicable

No response

The version/edition of the Eiffel Protocol used, if applicable

N/A

JonasAlfredsson commented 1 month ago

To convey to humans and machine tools that code is generated, generated source should have a line that matches the following regular expression (in Go syntax):

^// Code generated .* DO NOT EDIT\.$

This line must appear before the first non-comment, non-blank text in the file.

To me it looks like you need a trailing period as well.

magnusbaeck commented 1 month ago

Correct, thanks. Description updated.