You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "sdedic (via GitHub)" <gi...@apache.org> on 2023/08/02 05:56:00 UTC
[GitHub] [netbeans] sdedic commented on a diff in pull request #6277: Do not mark test methods as unused.
sdedic commented on code in PR #6277:
URL: https://github.com/apache/netbeans/pull/6277#discussion_r1281427862
##########
java/java.hints/src/org/netbeans/modules/java/hints/bugs/Unused.java:
##########
@@ -56,12 +62,33 @@ public class Unused {
@TriggerTreeKind(Kind.COMPILATION_UNIT)
public static List<ErrorDescription> unused(HintContext ctx) {
List<UnusedDescription> unused = UnusedDetector.findUnused(ctx.getInfo(), () -> ctx.isCanceled());
+ Set<UnusedDescription> toRemove = new HashSet<>();
+ if (!unused.isEmpty()) {
+ List<TestMethodController.TestMethod> tms = getTestMethods(ctx.getInfo());
Review Comment:
I'd prefer some SPI that other modules could plug into. For example, `@RequestMapping` or other annotations could be put even on a private method (although discouraged), and should be deemed "used" -- tracked as #6284
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists