MinecraftDev icon indicating copy to clipboard operation
MinecraftDev copied to clipboard

Add inspection for targeting the same class multiple times in a mixin

Open O7410 opened this issue 1 year ago • 2 comments

Currently it's a weak warning

O7410 avatar Aug 10 '24 23:08 O7410

This is looking pretty good, there's a few things to note:

  • this does not cover cases where a class literal and string target both reference the same class
  • it would be nice to have some tests for this inspection, you can use InvalidInjectorMethodSignatureInspectionTest as a reference.
  • you should be fine getting PsiClass.mixinTargets once and pass it around, instead of hitting the cache again and again

RedNesto avatar Aug 12 '24 11:08 RedNesto

Take a look at the latest commit

O7410 avatar Aug 13 '24 23:08 O7410