Checking Groovy code's quality with CodeNarc
As soon as you finish writing your first Groovy scripts or classes, you will probably start wondering how Groovy pros write their code and what are the best practices they are using. One way would be to learn by peeking at the best Groovy code bases (for example, Groovy itself: https://github.com/groovy/groovy-core/tree/master/src/main/groovy). Another way can be using code analysis tools that let you catch common coding mistakes that are already well-known in the community.
In the Java language world, there are many open source static code analysis tools such as PMD (Project Mess Detector) (http://pmd.sourceforge.net/), Checkstyle (http://checkstyle.sourceforge.net/), FindBugs (http://findbugs.sourceforge.net/), and so on. There are also many commercial products and IDEs that support various types of Java source code analysis.
In that regard, Groovy is less rich, though it has one library called CodeNarc (http://codenarc.sourceforge.net). The library...