Groovy
▶ Groovy Sorting
@tothenew's video shows in just 5 minutes the powerful sort options in Groovy.
I specially love the example of Groovy's findResult method combined with a closure's list to create a succinct sort closure.
▶ Inmutable AST
Another short @tothenew's video which shows how @Inmutable AST transformation aids your code robustness.
Spock
[SPANISH] Mocking with Spock
@xala3pa continues his great Spock Series. This posts deals with Mocking, Stubs and Spies. Really, really worth the read.
Gradle
Gradle and CodeNarc
CodeNarc is a rule-based code quality analysis tool for Groovy-based projects. Installing CodeNarc in your Groovy ecosystem projects is as easy as using the Gradle CodeNarc Plugin. Great thing that Grails 3 is now build with Gradle.
@cjstehno's post shows how to configure different rules or have different configurations for your main code and your test code with two simple blocks in your build.gradle.
Are you looking for a rules set to start? I've borrowed @JennStrater's groovy ruleset files while installing CodeNarc at Shoptimix codebase. Installation is really 5 minutes
Excluding classes in the CodeNarc Grails plugin
@marioggar shows how to exclude classes from certain rules in CodeNarc.
Using doNotApplyToClassNames in a CodeNarc rules set file seems handy when you want to exclude from a strict rule certain classes, such as tests.
Detect vulnerabilities within Grails applications using CodeNarc
@sethlaw and @cmalekpour show how to use CodeNarc to improve security. In particular they show how to use CodeNarc to check for Insecure Redirects. Really interesting to use CodeNarc as a security checklist.
Configure Codenarc Plugin in Grails 2 Apps
If you are using a previous version of Grails, before the move to Gradle, you can install CodeNarc with a Grails 2 Plugin. @farjinaarad shows how to configure the plugin and use a couple of extra tricks. For example, how to suppress warning on specific methods.
Comment
You will find in the next links a lot of CodeNarc material. From installation to more advanced configuration and special use cases, such as using CodeNarc to improve security. There are a couple of Groovy goodies as always. Enjoy!
Groovy Calamari