3

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.

deflomu
  • 596
  • 1
  • 4
  • 16

1 Answers1

0

Based on the linked issue, this has been resolved by allowing scripts, but not classes.

cdeszaq
  • 30,869
  • 25
  • 117
  • 173