google / google/error-prone

Add an annotation that indicates a parameter must be used

Open
#861 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

We just discovered a bug in a recent change caused by forgetting to use a parameter: https://github.com/google/closure-compiler/pull/2740#pullrequestreview-83026869

It would be great if we could annotate the `value` parameter as `@MustBeUsed` on the abstract `apply` method and then ErrorProne would disallow anyone from overriding that method without using `value` somewhere in the body.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.