Request for feedback: checker for required method calls on builders
- Dominant language
- Java
- Stars
- 10.6k
- Forks
- 1.2k
- Avg merge
- 6h 32m
- Merged PRs (30d)
- 13
Description
Dear AutoValue developers,
We would like your feedback on a static analysis tool that prevents errors in AutoValue clients by guaranteeing that required methods are always called on AutoValue Builders. The required methods are those that set a property that is not `@Nullable`, `Optional`, or a Guava Immutable Collection. We have run the checker on some projects that use AutoValue, and discovered a real bug:
https://github.com/googleapis/gapic-generator/issues/2892
You can read more about the checker in its README:
https://github.com/kelloggm/object-construction-checker
and in a soon-to-be-published research paper:
https://homes.cs.washington.edu/~kelloggm/papers/ICSE2020-camera-ready.pdf
Here is a sample project showing the checker in action for some sample AutoValue code:
https://github.com/msridhar/obj-cons-autovalue-example
We would be very happy to get your feedback on this checker. If you think it is of value, we would like to have the checker publicized to AutoValue users. Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.