-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotate generated code with @Generated #29
Comments
The argument only works with protoc 3, looks like. |
Yes, I've just played around with that, and it seems that it's only supported in proto3. I think I'll wait until the option (in whatever form) is officially supported before introducing any changes into the plugin (otherwise I may potentially be forced to support two incompatible implementations). |
Would it make sense to support specifying custom options to be passed to |
There's scarse (if at all) documentation on the custom |
Fair point. As is I find the plugin very useful, thank you for creating it. |
Is there a workaround to enable this right now with the present plugin? Also note that the @generated must be something that the Code Analysis tool can see so far Jacoco can only see it if it is a runtime annotation, so if they use javax.annotation.Generated, it will not be skipped for analysis. |
With the current snapshot version of the plugin it is possible to pass arbitrary |
Is there any plan to release the snapshot? |
Annotating java code with
@Generated
mark would indicate to static analysis tools that it should be skipped.I think we can do this by passing
--java_opt=annotate_code
to protoc, although this behaviour is undocumented.See also protocolbuffers/protobuf#42 and protocolbuffers/protobuf#2513
The text was updated successfully, but these errors were encountered: