I have a checkstyle rule that limits the maximum method length. It doesn’t seem to work correctly on groovy files and I suspect it has to do with how closures are handled by checkstyle.
In general, does checkstyle work well on groovy or are there other tools more geared toward groovy files?
I recommend using CodeNarc for checking Groovy code. It is designed for this purpose. The rule MethodSize is the specific rule you should use.
Using Checkstyle is a bad idea as it cannot understand the Groovy syntax, as it is a super set of the Java language. It would definitely fail to parse closures.