[Suggestion]ArrayEquals supports detection assertEquals(array1, array2) is recommended
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
### Description of the problem / feature request:
For rule ArrayEquals, assertEquals(array1, array2) is also used to determine whether the array is equalalled . It is recommended that this rule supplement the detection of this case.
This rule is implemented in error_prone_core-2.3.4-sources.jar!\com\google\errorprone\bugpatterns\ArrayEquals.java,
use instanceMethod().onClass(isArray()).named("equals"), argument(0, isArrayType()) to detect the case array1.equals(array2),
use staticEqualsInvocation(), argument(0, isArrayType()), argument(1, isArrayType()) to detect the case Array.equals(array1, array2).
So this rule cannot detect this case: assertEquals(array1, array2)
### Feature requests: what underlying problem are you trying to solve with this feature?
```
assertEquals(array1, array2);
```
### What version of Error Prone are you using?
2.3.4
### Have you found anything relevant by searching the web?
no
Contributor guide
Assessment
This issue has not been assessed yet.