Emit `@javax.annotation.Generated` annotations
I'm trying to add Error Prone checks to a project using QuickBuffers. However, I get a bunch of warnings from Error Prone in the generated Java code when I do so.
Error Prone has an option -XepDisableWarningsInGeneratedCode to ignore generated code. This uses the @javax.annotation.Generated annotation. Could we have the output annotated with this annotation?
Alternatively, fixing the warnings would be acceptable, until Error Prone adds more warnings that trip on the QuickBuffers generated code 😅
Example build output
> Task :wpimath:compileJava FAILED
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:292: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
output.writeDouble(FieldNames.x, x);
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:295: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
output.writeDouble(FieldNames.y, y);
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:308: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
if (input.isAtField(FieldNames.x)) {
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:319: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
if (input.isAtField(FieldNames.y)) {
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:560: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
output.writeDouble(FieldNames.value_, value_);
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:573: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
if (input.isAtField(FieldNames.value_)) {
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:918: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
output.writeMessage(FieldNames.translation, translation);
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:921: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
output.writeMessage(FieldNames.rotation, rotation);
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:934: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
if (input.isAtField(FieldNames.translation)) {
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:945: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
if (input.isAtField(FieldNames.rotation)) {
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1292: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
output.writeMessage(FieldNames.translation, translation);
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1295: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
output.writeMessage(FieldNames.rotation, rotation);
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1308: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
if (input.isAtField(FieldNames.translation)) {
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1319: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
if (input.isAtField(FieldNames.rotation)) {
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1688: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
output.writeDouble(FieldNames.dx, dx);
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1691: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
output.writeDouble(FieldNames.dy, dy);
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1694: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
output.writeDouble(FieldNames.dtheta, dtheta);
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1707: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
if (input.isAtField(FieldNames.dx)) {
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1718: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
if (input.isAtField(FieldNames.dy)) {
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1729: warning: [SameNameButDifferent] The name `FieldNames` refers to [edu.wpi.first.math.proto.Geometry2D.ProtobufTranslation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufRotation2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufPose2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTransform2d.FieldNames, edu.wpi.first.math.proto.Geometry2D.ProtobufTwist2d.FieldNames] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity.
if (input.isAtField(FieldNames.dtheta)) {
^
(see https://errorprone.info/bugpattern/SameNameButDifferent)
Did you mean 'output.writeDouble(ProtobufTranslation2d.FieldNames.x, x);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:57: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return this proto file's descriptor.
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns this proto file's descriptor.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:83: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return a new empty instance of {@code ProtobufTranslation2d}
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns a new empty instance of {@code ProtobufTranslation2d}.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:346: warning: [UnnecessaryParentheses] These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
return ((bitField0_) == 0);
^
(see https://errorprone.info/bugpattern/UnnecessaryParentheses)
Did you mean 'return ( bitField0_ == 0);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:363: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return factory for creating ProtobufTranslation2d messages
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns factory for creating ProtobufTranslation2d messages.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:370: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return this type's descriptor.
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns this type's descriptor.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:410: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return a new empty instance of {@code ProtobufRotation2d}
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns a new empty instance of {@code ProtobufRotation2d}.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:600: warning: [UnnecessaryParentheses] These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
return ((bitField0_) == 0);
^
(see https://errorprone.info/bugpattern/UnnecessaryParentheses)
Did you mean 'return ( bitField0_ == 0);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:617: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return factory for creating ProtobufRotation2d messages
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns factory for creating ProtobufRotation2d messages.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:624: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return this type's descriptor.
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns this type's descriptor.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:667: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return a new empty instance of {@code ProtobufPose2d}
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns a new empty instance of {@code ProtobufPose2d}.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:972: warning: [UnnecessaryParentheses] These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
return ((bitField0_) == 0);
^
(see https://errorprone.info/bugpattern/UnnecessaryParentheses)
Did you mean 'return ( bitField0_ == 0);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:989: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return factory for creating ProtobufPose2d messages
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns factory for creating ProtobufPose2d messages.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:996: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return this type's descriptor.
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns this type's descriptor.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1041: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return a new empty instance of {@code ProtobufTransform2d}
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns a new empty instance of {@code ProtobufTransform2d}.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1346: warning: [UnnecessaryParentheses] These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
return ((bitField0_) == 0);
^
(see https://errorprone.info/bugpattern/UnnecessaryParentheses)
Did you mean 'return ( bitField0_ == 0);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1363: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return factory for creating ProtobufTransform2d messages
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns factory for creating ProtobufTransform2d messages.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1370: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return this type's descriptor.
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns this type's descriptor.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1420: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return a new empty instance of {@code ProtobufTwist2d}
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns a new empty instance of {@code ProtobufTwist2d}.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1756: warning: [UnnecessaryParentheses] These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
return ((bitField0_) == 0);
^
(see https://errorprone.info/bugpattern/UnnecessaryParentheses)
Did you mean 'return ( bitField0_ == 0);'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1773: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return factory for creating ProtobufTwist2d messages
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns factory for creating ProtobufTwist2d messages.'?
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/Geometry2D.java:1780: warning: [MissingSummary] A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
* @return this type's descriptor.
^
(see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment)
Did you mean '*Returns this type's descriptor.'?
error: warnings found and -Werror specified
The problem is that the @javafx.annotation.Generated annotation is not bundled with the JDK and would add a dependency. I could add an optional flag, but the better path would probably be to fix the warnings.
Do you know what it would take to fix them?
I was hoping you'd have a better sense for how difficult it'd be to fix the warnings I listed above. I haven't delved into the QuickBuffers codebase.
Here's another warning. We have a proto called system.proto. I don't think this is really fixable on the QuickBuffers side, unless the top-level class names are changed.
> Task :wpimath:compileJava FAILED
/Users/davidv/dev/frc/wpilibsuite/allwpilib/wpimath/src/generated/main/java/edu/wpi/first/math/proto/System.java:20: warning: [JavaLangClash] edu.wpi.first.math.proto.System clashes with java.lang.System
public final class System {
^
(see https://errorprone.info/bugpattern/JavaLangClash)
error: warnings found and -Werror specified
I was hoping you'd have a better sense for how difficult it'd be to fix the warnings I listed above. I haven't delved into the QuickBuffers codebase.
You could modify the generated code and let me know the required diff. It'd be easy to change the structure once I know what the results should be
Here's another warning. We have a proto called system.proto. I don't think this is really fixable on the QuickBuffers side, unless the top-level class names are changed.
That probably makes the point moot. I also disagree with a few of the highlighted issues, so I might as well add a flag to include the annotation.
Thanks, that'd be nice.
I also just noticed that the annotation moved from javax.annotation.Generated to javax.annotation.processing.Generated in Java 9 apparently. I believe Error Prone recognises any annotation with the name Generated though.
Can you check whether a custom Generated annotation would fix it? Adding a quickbuf.Generated annotation wouldn't add a dependency.
You should also be able to exclude the generated directory https://github.com/google/error-prone/issues/463#issuecomment-352974518
Did you have a chance to confirm whether a custom @Generated annotation would work?
Any update?
Closing due to inactivity.