-
Notifications
You must be signed in to change notification settings - Fork 1
Add the ability to ignore suppressions in SuppressibleTreePathScanner
#200
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
Conversation
Generate changelog in
|
✅ Successfully generated changelog entry!What happened?Your changelog entries have been stored in the database as part of our migration to ChangelogV3. Need to regenerate?Simply interact with the changelog bot comment again to regenerate these entries. 📋Changelog Preview✨ Features
|
| .collect(Collectors.toMap( | ||
| Map.Entry::getKey, Map.Entry::getValue, (val1, val2) -> val1 + "," + val2)); |
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.
EntryStream has a slightly shorter .toMap(mergeFunction) method.
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.
So this is letting us natively has the same option multiple times, which then builds them up as a list (aka comma separated string argument)?
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.
Why do we actually need this change?
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.
Oops I think this was required to handle some extra options in the next PR. Can't remember why exactly it was needed, but let's remove it from this PR.
.../main/java/com/palantir/gradle/suppressibleerrorprone/modes/common/ModifyCheckApiOption.java
Outdated
Show resolved
Hide resolved
.../main/java/com/palantir/gradle/suppressibleerrorprone/modes/common/ModifyCheckApiOption.java
Outdated
Show resolved
Hide resolved
...alantir/gradle/suppressibleerrorprone/transform/SuppressibleTreePathScannerClassVisitor.java
Show resolved
Hide resolved
...main/java/com/palantir/gradle/suppressibleerrorprone/transform/ModifyErrorProneCheckApi.java
Outdated
Show resolved
Hide resolved
|
Released 2.21.0 |
Before this PR
We are working on
-PerrorProneRemoveUnused, a mode which removes all unused suppressions. This mode requires us to turn on the ignore suppressions option in error-prone, or else we can't descend into suppressed trees to chec.Error-prone's
SuppressibleTreePathScannerdoesn't respect this flag. This is not expected behavior, asErrorProneScannerrespects the flag. We've opened google/error-prone#5255, but I think it will take some time to be merged. In the mean time, let's add the option to insert some bytecode so theSuppressibleTreePathScannerrespects this flag when we need it to.After this PR
==COMMIT_MSG==
Add the ability to ignore suppressions in
SuppressibleTreePathScanner==COMMIT_MSG==
Possible downsides?