-
Notifications
You must be signed in to change notification settings - Fork 746
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
Ignore disabled checks passed to -XepPatchChecks
#4028
Ignore disabled checks passed to -XepPatchChecks
#4028
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
@oxkitsune these PRs are generally merged with the PR text as commit message, so I would also add this sentence to the PR body (just like in the commit message):
Rather than throwing an
NoSuchElementException
.
That's already the case right? It should be good like it is right now. |
I would swear that my browser didn't show it. But I must have been confused. 🤔 |
Thanks for this fix! I finally did some internal testing of this, and one thing I encountered is that this changes of behaviour of things like Do you have thoughts on what the least surprising behaviour here would be? |
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.
Un-approving until the question in #4028 (comment) is resolved
Personally I think it would make the most sense, if checks passed to E.g.
would emit patches for
would emit just patches for |
That sounds good to me. I think that there isn't an order that I wonder if it makes sense of |
I'll need to find some time later to think this through more thoroughly, but I wonder whether we'll regret that if #947 is ever merged (still hoping 😉): then That said, we have the #947 change in our fork, and right now we do have this "patch all except those that are Easiest is perhaps to first add a few more tests, and then assess impact on #947. |
My too, I think :) The existing logic only calls filter if i.e. something like: ScannerSupplier toUse = ErrorPronePlugins.loadPlugins(scannerSupplier, context);
ImmutableSet<String> namedCheckers = epOptions.patchingOptions().namedCheckers();
if (!namedCheckers.isEmpty()) {
toUse = toUse.filter(bci -> namedCheckers.contains(bci.canonicalName()));
} else {
toUse = toUse.applyOverrides(epOptions);
}
return ErrorProneScannerTransformer.create(toUse.get()); |
Rather than throwing an `NoSuchElementException`. Fixes google#3908.
4d502e0
to
5865373
Compare
Hey @cushon apologies for the inactivity 😅 |
No worries, thanks for coming back to this! |
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.25.0` -> `2.26.1` | | [com.google.errorprone:error_prone_annotations](https://errorprone.info) ([source](https://github.com/google/error-prone)) | compile | minor | `2.25.0` -> `2.26.1` | --- ### Release Notes <details> <summary>google/error-prone</summary> ### [`v2.26.1`](https://github.com/google/error-prone/releases/tag/v2.26.1): Error Prone 2.26.1 [Compare Source](google/error-prone@v2.26.0...v2.26.1) Changes: - Fix the module name of the annotations artifact: `com.google.errorprone.annotations` (google/error-prone@9d99ee7) Full Changelog: google/error-prone@v2.26.0...v2.26.1 ### [`v2.26.0`](https://github.com/google/error-prone/releases/tag/v2.26.0): Error Prone 2.26.0 [Compare Source](google/error-prone@v2.25.0...v2.26.0) Changes: - The 'annotations' artifact now includes a `module-info.java` for Java Platform Module System support, thanks to [@​sgammon](https://github.com/sgammon) in [#​4311](google/error-prone#4311). - Disabled checks passed to `-XepPatchChecks` are now ignored, instead of causing a crash. Thanks to [@​oxkitsune](https://github.com/oxkitsune) in [#​4028](google/error-prone#4028). New checks: - [`SystemConsoleNull`](https://errorprone.info/bugpattern/SystemConsoleNull): Null-checking `System.console()` is not a reliable way to detect if the console is connected to a terminal. - [`EnumOrdinal`](https://errorprone.info/bugpattern/EnumOrdinal): Discourage uses of `Enum.ordinal()` Closed issues: [#​2649](google/error-prone#2649), [#​3908](google/error-prone#3908), [#​4028](google/error-prone#4028), [#​4311](google/error-prone#4311), [#​4314](google/error-prone#4314) Full Changelog: google/error-prone@v2.25.0...v2.26.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-->
Rather than throwing an
NoSuchElementException
.Fixes #3908.