Skip to content
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

Remove SwitchStatementDefaultCase error-prone check #1309

Merged
merged 2 commits into from
May 13, 2020

Conversation

pkoenig10
Copy link
Member

@pkoenig10 pkoenig10 commented Mar 27, 2020

Fixes #499
Fixes #541
Fixes #580

Before this PR

Baseline provides a SwitchStatementDefaultCase error-prone check.

After this PR

Baseline does not provide a SwitchStatementDefaultCase error-prone check.

I added this back in #481 with a very narrow focus on enums used in APIs. However there a many valid uses of default case in switch statements outside the narrow scope of interacting with an API.

We've ended disabling this check on many of our internal repos. And for repos that haven't disabled this check, having it at SUGGESTION results in a noisy compiler output.

A number of other people have experience friction with this check, see the issues linked above.

The built-in error-prone switch statement checks should be sufficient for our uses.

@changelog-app
Copy link

changelog-app bot commented Mar 27, 2020

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Baseline no longer provides a SwitchStatementDefaultCase error-prone check.

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from ferozco March 27, 2020 22:48
@stale
Copy link

stale bot commented Apr 11, 2020

This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days.

@stale stale bot added the stale label Apr 11, 2020
@pkoenig10
Copy link
Member Author

@iamdanfox @ferozco any thoughts on this?

@stale stale bot removed the stale label Apr 11, 2020
@stale
Copy link

stale bot commented Apr 25, 2020

This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days.

@stale stale bot added the stale label Apr 25, 2020
@pkoenig10
Copy link
Member Author

@iamdanfox @ferozco another gentle ping

@stale stale bot removed the stale label Apr 26, 2020
@iamdanfox
Copy link
Contributor

Ok so we're now just relying on product teams to know to avoid using default when they want to have exhaustiveness validated?

@pkoenig10
Copy link
Member Author

Yes.

This check was only ever a SUGGESTION, so it was never a hard failure and relied on noticing the message in the compiler output.

@stale
Copy link

stale bot commented May 12, 2020

This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days.

@stale stale bot added the stale label May 12, 2020
@pkoenig10
Copy link
Member Author

@iamdanfox any other concerns here?

@stale stale bot removed the stale label May 12, 2020
@bulldozer-bot bulldozer-bot bot merged commit 1149a5b into develop May 13, 2020
@bulldozer-bot bulldozer-bot bot deleted the pkoenig10/switchStatementDefaultCase branch May 13, 2020 17:03
@svc-autorelease
Copy link
Collaborator

Released 3.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants