-
Notifications
You must be signed in to change notification settings - Fork 134
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
Add PreventUsingIncubatingMethods
error-prone check (conjure)
#1554
Add PreventUsingIncubatingMethods
error-prone check (conjure)
#1554
Conversation
An explicit check which warns against using incubating APIs; you can disable it on a per-project basis, or on a per-usage basis using @SuppressWarnings.
Thanks for your interest in palantir/gradle-baseline, @blacksmithgu! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
Generate changelog in
|
cc @carterkozak |
...rror-prone/src/main/java/com/palantir/baseline/errorprone/PreventUsingIncubatingMethods.java
Outdated
Show resolved
Hide resolved
...rror-prone/src/main/java/com/palantir/baseline/errorprone/PreventUsingIncubatingMethods.java
Outdated
Show resolved
Hide resolved
To be more in line with other checks.
...rror-prone/src/main/java/com/palantir/baseline/errorprone/PreventUsingIncubatingMethods.java
Outdated
Show resolved
Hide resolved
baseline-error-prone/src/test/java/com/palantir/baseline/errorprone/IncubatingMethodTest.java
Outdated
Show resolved
Hide resolved
To ensure we get a compile break if @Incubating ever moves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm, thanks!
Released 3.53.0 |
An explicit check which warns against using incubating APIs; you can disable it on a per-project basis, or on a per-usage basis using @SuppressWarnings.
Before this PR
Incubating APIs are a stability liability, and should generally only be used explicitly (i.e., opt-in instead of opt-out). This check prevents their usage without an explicit annotation or opt-out.
After this PR
Adds the
PreventUsingIncubatingMethods
error-prone check, which blocks methods annotated with Conjure's@Incubating
annotation.Possible downsides?
Users upgrading
gradle-baseline
may get errors related to incubating methods until they either disable the check or tag their incubating API usages.