-
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
Remove duplicate entry in TypesWithUndefinedEquality#SPARSE_ARRAY
#29
Conversation
TypesWithUndefinedEquality#OBJECT
TypesWithUndefinedEquality#SPARSE_ARRAY
TypesWithUndefinedEquality#SPARSE_ARRAY
TypesWithUndefinedEquality#SPARSE_ARRAY
dde42c8
to
f6db6b0
Compare
To make things easier for them to review, ideally, we do something like we did here. Perhaps @Stephan202 you have an idea on this? The best I got was this:
With the somewhat confusing output 😄 :
|
f6db6b0
to
37f5a40
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. The following (hacky, likely Linux-only) script verifies that this PR does not introduce additional changes:
#!/usr/bin/env bash
set -e -u -o pipefail
normalize() {
local rev="${1}"
git show "${rev}:core/src/main/java/com/google/errorprone/bugpatterns/TypesWithUndefinedEquality.java" \
| grep -Pzo '(?<=LONG_SPARSE_ARRAY\()[^)]+' | grep -Pao '[\w.]+' | sort -u
git show "${rev}:core/src/main/java/com/google/errorprone/bugpatterns/TypesWithUndefinedEquality.java" \
| grep -Pzo '(?<=SPARSE_ARRAY\()[^)]+' | grep -Pao '[\w.]+' | sort -u
git show "${rev}:core/src/main/java/com/google/errorprone/bugpatterns/TypesWithUndefinedEquality.java" \
| grep -Po '[A-Z_]+\(' | sort -u
}
diff -u <(normalize master) <(normalize HEAD)
Suggested commit message:
Remove duplicate `TypesWithUndefinedEquality#SPARSE_ARRAY` entry
Type `androidx.collection.SparseArrayCompat` was listed twice.
While there, sort the enum elements and type names.
IMMUTABLE_MULTIMAP("ImmutableMultimap", "com.google.common.collect.ImmutableMultimap"), | ||
IMMUTABLE_COLLECTION("ImmutableCollection", "com.google.common.collect.ImmutableCollection"), |
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.
C
comes before M
👀
37f5a40
to
7491fed
Compare
7491fed
to
c697984
Compare
OK rebased it and squash some of the commits. Shall I open the PR with the suggested commit message as description and add a comment as suggested in the PR description? Also, the script should be in the PR description then 😄 ? |
I'd open the PR with just the suggested commit message as text, and then add the script as a comment, I think :) As for adding a comment about |
Opened PR upstream: google#3110 |
Fixed in: google@f35b9df. |
While there:
TypesWithUndefinedEquality#SPARSE_ARRAY
When opening the PR, add the following comment (open to suggestions):