I am using the log function of the com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck class.
As a result, in the Problems tab folder of the Eclipse, I see the required message but it is preceeded by the full name of my package and the check class.
I wrote this code : log("Do not write too complex expressions")
But in the Problems tab folder this line is displayed.
cs.md.java.checks.ComplexExpression Do not write too complex expressions.
I would like to suppress the package/class name in the message (appears in bold).
How can I do it?
Un-ticking Window->Preferences->Checkstyle->Include rule name in violation message should do the trick.
Sorry for the late reply...
Thanks for the answer.
I have the same problem but I don't want to remove also the module name.
I only want to remove the full package prefix and use only module name as prefix of the log message.
I've put my checkstyle-metadata.xml and "checkstyle-metadata.properties" files in the my checks packages following the custom tutorial
but It can't solve the problem.
Have I forget something ?
Thanks a lot.
Please check out our sample project containing a customer check:
My first guess would be that you're missing the package.xml or something in the metadata.xml - or you're using the fully qualified check name in your checkstyle configuration file, instead of the shortened check name (which proper configuration of packages.xml would allow you to)...
Effectively, I hade a non closed tag in my checkstyle-metadata.xml file.
As I started Eclipse with -console option, I got the OSGI concole but the error was not logged there, rather in the workspace log file that I didn't check.
I correct it and everything works fine as expected.
Thanks again for your response