Ignore disabled checks passed to -XepPatchChecks#62
Conversation
rickie
left a comment
There was a problem hiding this comment.
As discussed offline; we can probably add a test in the ScannerSupplierTest.java which makes it a lot easier to see what we are fixing. Additionally, it's nice to have a reproduction case in the code to quickly iterate.
Added a commit 😄.
163e405 to
9af0e66
Compare
rickie
left a comment
There was a problem hiding this comment.
Added a small commit. Really nice fix @oxkitsune 🚀 !
Suggested commit message:
Don't consider disabled checks passed to `-XepPatchChecks`
Fixes #3908.
Alternative suggested commit message:
Have `ScannerSupplier#applyOverrides` only consider enabled checks
Fixes #3908.
Consider could also be a different word like "modify" or "update".
Not too happy with the suggestions, ideas welcome.
| private final CompilationTestHelper compilationHelper = | ||
| CompilationTestHelper.newInstance(ShouldNotUseFoo.class, getClass()); | ||
|
|
||
| @Test |
There was a problem hiding this comment.
We can move this to the bottom of the class as we are adding it only now. Not a really good reason but it feels like the right thing to do?
There was a problem hiding this comment.
I wasn't exactly sure if this is the right file for the test, but I agree!
2dc88b7 to
61cc147
Compare
Stephan202
left a comment
There was a problem hiding this comment.
Rebased and added a commit. Tweaked suggested commit message:
Ignore disabled checks passed to `-XepPatchChecks`
Rather than throwing an `NoSuchElementException`.
Fixes #3908.
61cc147 to
4d502e0
Compare
|
Upstream PR: google#4028 |
-XepPatchChecks-XepPatchChecks
Rather than throwing an `NoSuchElementException`. Fixes google#3908.
4d502e0 to
5865373
Compare
Rather than throwing an
NoSuchElementException.Related issue: google#3908