Unify duplicate code detection with code reimplementations #648
Labels
api
lints that check for code that reimplements parts of the api
D-hard
duplicate-code
enhancement
New feature or request
high-priority
Issues that should be solved as soon as possible
Description
Motivation
The duplicate code detection is used to detect pieces of code that are mostly the same, except for maybe a few places where they differ.
A very similar problem is the detection of code that already exists in the standard library. The associated checks are mostly in the
api
package.Most of them are implemented like this:
This is effectively doing the duplicate code detection, but manually. One could speed up the process for new checks, by reusing the duplicate code check and by further improving the duplicate code detection, one would improve the api checks as well.
Benefits
contains
(orArrays.asList(....).contains
) #620, where it is questionable if they are worth the effortDisadvantages
The text was updated successfully, but these errors were encountered: