简体   繁体   中英

How to include custom rules in the grails codenarc plugin

I have a set of custom rules for codenarc and they use inheritance and abstract classes to share some code. The question is how to use this rules without modifying codenarc and building the codenarc.jar myself or How to inject classes into codenarc in the the codenarc plugin .

As far as I can tell it is no possible to use rule("file:path/to/MyCustomRule.groovy") because MyCustomRule inherits from AbstractCustomRule which is not loaded be default and cannot be loaded with rule() in the ruleset configuration. Maybe I am missing something here?

There is the related issue GPCODENARC-32 but without updates for 2 years.

根据链接的问题 ,这已通过允许脚本而不是类来解决。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM