From d3a745050c356b74e88607f3ff04614e76026613 Mon Sep 17 00:00:00 2001 From: Daniel Espendiller Date: Mon, 1 Jun 2020 11:01:08 +0200 Subject: [PATCH] fix PHPStorm @noinspection causes Missing Import warning #190 --- .../idea/php/annotation/util/AnnotationUtil.java | 3 +++ .../AnnotationMissingUseInspectionTest.java | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/main/java/de/espend/idea/php/annotation/util/AnnotationUtil.java b/src/main/java/de/espend/idea/php/annotation/util/AnnotationUtil.java index 3ae7dc83..d9d5bc05 100644 --- a/src/main/java/de/espend/idea/php/annotation/util/AnnotationUtil.java +++ b/src/main/java/de/espend/idea/php/annotation/util/AnnotationUtil.java @@ -66,6 +66,9 @@ public class AnnotationUtil { add("@Required"); add("@Attributes"); add("@Attribute"); + add("@test"); + add("@noninspection"); + add("@noinspection"); }}; public static boolean isAnnotationClass(@NotNull PhpClass phpClass) { diff --git a/src/test/java/de/espend/idea/php/annotation/tests/inspection/AnnotationMissingUseInspectionTest.java b/src/test/java/de/espend/idea/php/annotation/tests/inspection/AnnotationMissingUseInspectionTest.java index 2617c12b..a13fc13b 100644 --- a/src/test/java/de/espend/idea/php/annotation/tests/inspection/AnnotationMissingUseInspectionTest.java +++ b/src/test/java/de/espend/idea/php/annotation/tests/inspection/AnnotationMissingUseInspectionTest.java @@ -106,5 +106,17 @@ public void testThatBlacklistedAnnotationDoesNotProvideInpsectionMessage() { "}", AnnotationMissingUseInspection.MESSAGE ); + + assertLocalInspectionContainsNotContains("test.php", "ction()\n" + + " */\n" + + "class Foo\n" + + "{\n" + + "}", + AnnotationMissingUseInspection.MESSAGE + ); } }