jshiell / checkstyle-idea

CheckStyle plug-in for IntelliJ IDEA
https://plugins.jetbrains.com/plugin/1065-checkstyle-idea
Other
887 stars 161 forks source link

Use Custom Rule for Code Style Formatting #629

Closed sashokbg closed 7 months ago

sashokbg commented 10 months ago

Hello,

At our team we are using the checkstyle IDEA plugin and we use the codestyle formatting feature. Now I want to add a custom checkstyle rule developed by a third party, but it seems that the codestyle plugin cannot format the code for this new rule.

Is this feature available, or am I doing things wrong ?

The additional rule: https://github.com/tfij/check-tfij-style

Thank you

EDIT: Adding relative error message:

The Checkstyle rules file could not be parsed. cannot initialize module TreeWalker - cannot initialize module MethodParameterLinesCheck - Unable to instantiate 'MethodParameterLinesCheck' class, it is also not possible to instantiate it as .MethodParameterLinesCheck, MethodParameterLinesCheckCheck, .MethodParameterLinesCheckCheck. Please recheck that class name is specified as canonical name or read how to configure short name usage

jshiell commented 9 months ago

Sorry for the delay, it's been a mess of a month.

Have you added the additional rule to the third-party classpath in settings? The error suggests that Checkstyle can't find the check class.

jshiell commented 7 months ago

Closing due to no further information