alibaba / p3c

Alibaba Java Coding Guidelines pmd implements and IDE plugin
https://github.com/alibaba/p3c/wiki
Apache License 2.0
30.28k stars 8.05k forks source link

How can I use my custom rule which is similar to defined rule? #989

Open Rapter1990 opened 7 months ago

Rapter1990 commented 7 months ago

I want to add a new Rule to this plugin. The rule is based on the Methods which should be named in lowerCamelCase style. I noticed that it is already defined in the rule. However, the rule's implementation is different than the defined rule.

How can I suppress the defined the rule and use my own custom rule?

Can you help me which way I should use with providing the code example if possible?

godfather1103 commented 7 months ago

https://github.com/alibaba/p3c/blob/master/idea-plugin/p3c-common/src/main/resources/rulesets/java/ali-pmd.xml