pluginrpc-gen: align generator with generated#49920
Conversation
92ac3a1 to
1ef9003
Compare
|
@thaJeztah , exclusions:
# Mode of the generated files analysis.
#
# - `strict`: sources are excluded by strictly following the Go generated file convention.
# Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`
# This line must appear before the first non-comment, non-blank text in the file.
# https://go.dev/s/generatedcode
# - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.
# - `disable`: disable the generated files exclusion.
#
# Default: strict
generated: lax |
|
Oh! I recall I looked at this once as well, and ISTR there was some discussion, but I really need to refresh my memory; |
cc32dd9 to
f78ece4
Compare
|
Kicked CI; looks like we're hitting GitHub's new rate-limits 😓 |
cpuguy83
left a comment
There was a problem hiding this comment.
Mostly seems fine, except for it looks like the generator is producing some not quite correct code.
I"m not sure about the short/long as the value this accepts.
I'd think supporting a duration string would be ideal... but I guess it really doesn't matter. We could support both... or just what is here and extend as needed.
fff3777 to
3b71494
Compare
| // generated code - DO NOT EDIT | ||
| // Code generated by pluginrpc-gen. DO NOT EDIT. | ||
|
|
||
| package drivers // import "github.com/docker/docker/volume/drivers" |
There was a problem hiding this comment.
Except the // import "github.com/docker/docker/volume/drivers"
Everything is directly generated by pluginrpc-gen
ccbe306 to
3477465
Compare
0330c7f to
24cab3a
Compare
bd795de to
5948632
Compare
Signed-off-by: Matthieu MOREL <[email protected]>
- What I did
Updated pluginrpc-gen so its behavior is aligned with the generated version in
volume/drivers/proxy.go- How I did it
Updated code and regenerate it.
Notice that pluginrpc-gen does not handle
package {{ .Name }} // import "{{fullPackageName}}"generation- How to verify it
go build . in pluginrpc-gen package an then execute
pluginrpc-gen --type volumeDriver --name VolumeDriver -i volume/drivers/extpoint.go -o volume/drivers/proxy.go- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)