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

Introduce command-line flag -XepAllSuggestionsAsWarnings #3301

Conversation

rickie
Copy link
Contributor

@rickie rickie commented Jun 29, 2022

This enables users that build with -Werror to disallow violations of custom
SUGGESTION-level bug patterns.

Copy link
Contributor

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a bunch of SUGGESTION-level bug checkers internally (to be open sourced "soon" ™️), flagging things that aren't objectively warnings in all contexts. So this feature would be very helpful to us. :)

I verified against some internal code that the new flag works as intended.

Stephan202 pushed a commit to PicnicSupermarket/error-prone that referenced this pull request Aug 4, 2022
@rickie rickie changed the title Introduce command-line flag -Xep:AllSuggestionsAsWarnings Introduce command-line flag -XepAllSuggestionsAsWarnings Aug 8, 2022
@rickie rickie force-pushed the rossendrijver/suggestions_as_warnings branch from 3061fad to f654914 Compare August 8, 2022 07:01
@rickie rickie force-pushed the rossendrijver/suggestions_as_warnings branch from f654914 to 84da046 Compare September 2, 2022 07:56
Stephan202 pushed a commit to PicnicSupermarket/error-prone that referenced this pull request Oct 12, 2022
Stephan202 pushed a commit to PicnicSupermarket/error-prone that referenced this pull request Oct 13, 2022
@Stephan202
Copy link
Contributor

We have a bunch of SUGGESTION-level bug checkers internally (to be open sourced "soon" tm)

For completeness: those bug checkers are now open sourced as part of Error Prone Support. We're already using -XepAllSuggestionsAsWarnings as part of the project's self-check build, but it'd be nice if the self-check build did not rely on a fork of Error Prone. All that to say: it would be nice if this PR were accepted :)

@rickie rickie force-pushed the rossendrijver/suggestions_as_warnings branch from 84da046 to 85442e0 Compare October 24, 2022 08:12
@rickie rickie force-pushed the rossendrijver/suggestions_as_warnings branch from 85442e0 to 8ed0de3 Compare November 18, 2022 13:17
@rickie
Copy link
Contributor Author

rickie commented Nov 18, 2022

Rebased and resolved conflict.

@rickie rickie force-pushed the rossendrijver/suggestions_as_warnings branch from 8ed0de3 to 7f96b49 Compare December 27, 2022 19:37
@rickie
Copy link
Contributor Author

rickie commented Dec 27, 2022

Rebased and resolved conflict.

Would still be great if this could be added in Error Prone 😄.

@Stephan202 Stephan202 force-pushed the rossendrijver/suggestions_as_warnings branch from 7f96b49 to a0cdc7d Compare December 31, 2022 10:04
Stephan202 pushed a commit to PicnicSupermarket/error-prone that referenced this pull request Dec 31, 2022
Stephan202 pushed a commit to PicnicSupermarket/error-prone that referenced this pull request Jan 9, 2023
Stephan202 pushed a commit to PicnicSupermarket/error-prone that referenced this pull request May 10, 2023
Stephan202 pushed a commit to PicnicSupermarket/error-prone that referenced this pull request May 10, 2023
@rickie rickie force-pushed the rossendrijver/suggestions_as_warnings branch from a0cdc7d to 5cd3aa1 Compare June 7, 2023 16:55
copybara-service bot pushed a commit that referenced this pull request Jun 8, 2023
This enables users that build with `-Werror` to disallow violations of custom
`SUGGESTION`-level bug patterns.

Fixes #3301

FUTURE_COPYBARA_INTEGRATE_REVIEW=#3301 from PicnicSupermarket:rossendrijver/suggestions_as_warnings 5cd3aa1
PiperOrigin-RevId: 538605260
@copybara-service copybara-service bot closed this in af12364 Jun 8, 2023
benkard pushed a commit to benkard/jgvariant that referenced this pull request Jun 18, 2023
This MR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [com.google.errorprone:error_prone_core](https://errorprone.info) ([source](https://github.com/google/error-prone)) |  | minor | `2.19.1` -> `2.20.0` |
| [com.google.errorprone:error_prone_annotations](https://errorprone.info) ([source](https://github.com/google/error-prone)) | compile | minor | `2.19.1` -> `2.20.0` |

---

### Release Notes

<details>
<summary>google/error-prone</summary>

### [`v2.20.0`](https://github.com/google/error-prone/releases/tag/v2.20.0): Error Prone 2.20.0

[Compare Source](google/error-prone@v2.19.1...v2.20.0)

Changes:

-   This release is compatible with early-access builds of JDK 21.

New Checkers:

-   [`InlineTrivialConstant`](https://errorprone.info/bugpattern/InlineTrivialConstant)
-   [`UnnecessaryStringBuilder`](https://errorprone.info/bugpattern/UnnecessaryStringBuilder)
-   [`BanClassLoader`](https://errorprone.info/bugpattern/BanClassLoader)
-   [`DereferenceWithNullBranch`](https://errorprone.info/bugpattern/DereferenceWithNullBranch)
-   [`DoNotUseRuleChain`](https://errorprone.info/bugpattern/DoNotUseRuleChain)
-   [`LockOnNonEnclosingClassLiteral`](https://errorprone.info/bugpattern/LockOnNonEnclosingClassLiteral)
-   [`MissingRefasterAnnotation`](https://errorprone.info/bugpattern/MissingRefasterAnnotation)
-   [`NamedLikeContextualKeyword`](https://errorprone.info/bugpattern/NamedLikeContextualKeyword)
-   [`NonApiType`](https://errorprone.info/bugpattern/NonApiType)

Fixes issues: [#&#8203;2232](google/error-prone#2232), [#&#8203;2243](google/error-prone#2243), [#&#8203;2997](google/error-prone#2997), [#&#8203;3301](google/error-prone#3301), [#&#8203;3843](google/error-prone#3843), [#&#8203;3903](google/error-prone#3903), [#&#8203;3918](google/error-prone#3918), [#&#8203;3923](google/error-prone#3923), [#&#8203;3931](google/error-prone#3931), [#&#8203;3945](google/error-prone#3945), [#&#8203;3946](google/error-prone#3946)

**Full Changelog**: google/error-prone@v2.19.1...v2.20.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4yNC4wIiwidXBkYXRlZEluVmVyIjoiMzQuMjQuMCJ9-->
@rickie rickie deleted the rossendrijver/suggestions_as_warnings branch July 11, 2023 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants