CheckstyleAntTask and custom checks in classpath

21 views
Skip to first unread message

Gennis Emerson

unread,
Feb 12, 2021, 6:13:21 PM2/12/21
to checkstyle
Hi,

I've been updating an older project and adding Checkstyle back. The project has some custom checks. After updating those to handle Checkstyle API changes, I tried adding the custom checks jar file to the nested classpath element in the Ant task. The task doesn't seem to be able to find the checks in my jar file. I verified that the custom checks work by running from the command line, and I've changed my Ant build file to invoke Checkstyle from the command line, so I have things working, but I was wondering if I was missing something. 

Looking at the source for CheckstyleAntTask, it looks like the nested classpath element is set but not used. The commit at 145160f on October 12 2019 for Issue 3773 looks like it removed code that passed the nested classpath data along. Since this was part of a change for an issue to remove class loader use, I wasn't sure if this was an intended effect, or if there's another way to pass the location of custom checks to the task.

Again, I'm not blocked on this, just wanted to see if I missed something.

Thanks.

Roman Ivanov

unread,
Feb 27, 2021, 2:57:17 PM2/27/21
to Gennis Emerson, checkstyle
Hi Gennis,

it might happen is you define name of Checks in short form, but now we demand it to be by fully qualified names.

> I wasn't sure if this was an intended effect

it might not be intended .... we removed class path support from validation of sources, but it should be used to find thirdparty Checks. If you can reproduce it on some small example or opensource project - please create issue.

thanks,
Roman Ivanov

--
You received this message because you are subscribed to the Google Groups "checkstyle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to checkstyle+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/checkstyle/0c22fecf-bfbb-4ba6-8f67-55c199073dcfn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages