-
Notifications
You must be signed in to change notification settings - Fork 2
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
#62
Conversation
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.
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 😄.
check_api/src/main/java/com/google/errorprone/scanner/ErrorProneScanner.java
Outdated
Show resolved
Hide resolved
check_api/src/main/java/com/google/errorprone/scanner/ErrorProneScanner.java
Outdated
Show resolved
Hide resolved
check_api/src/main/java/com/google/errorprone/scanner/ErrorProneScanner.java
Outdated
Show resolved
Hide resolved
check_api/src/main/java/com/google/errorprone/scanner/ErrorProneScanner.java
Outdated
Show resolved
Hide resolved
163e405
to
9af0e66
Compare
check_api/src/main/java/com/google/errorprone/BaseErrorProneJavaCompiler.java
Outdated
Show resolved
Hide resolved
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.
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.
@@ -39,6 +39,23 @@ public class ScannerTest { | |||
private final CompilationTestHelper compilationHelper = | |||
CompilationTestHelper.newInstance(ShouldNotUseFoo.class, getClass()); | |||
|
|||
@Test |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't exactly sure if this is the right file for the test, but I agree!
2dc88b7
to
61cc147
Compare
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.
Rebased and added a commit. Tweaked suggested commit message:
Ignore disabled checks passed to `-XepPatchChecks`
Rather than throwing an `NoSuchElementException`.
Fixes #3908.
check_api/src/main/java/com/google/errorprone/BaseErrorProneJavaCompiler.java
Outdated
Show resolved
Hide resolved
core/src/test/java/com/google/errorprone/scanner/ScannerTest.java
Outdated
Show resolved
Hide resolved
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