Announcing CodeNarc 1.2
Author: Remko Popma
Published: 2018-07-10 10:16AM
StaticFieldsBeforeInstanceFieldsrule (convention) - Enforce that all static fields are above all instance fields within a class.
StaticMethodsBeforeInstanceMethodsrule (convention) - Enforce that all static methods within each visibility level (public, protected, private) are above all instance methods within that same visibility level.
PublicMethodsBeforeNonPublicMethodsrule (convention) - Enforce that all public methods are above protected and private methods.
GrailsDomainStringPropertyMaxSizerule (grails) - String properties in Grails domain classes have to define maximum size otherwise the property is mapped to VARCHAR(255) causing runtime exceptions to occur.
NoJavaUtilDaterule (convention) - Do not use java.util.Date. Prefer the classes in the java.time.* packages. Checks for construction of new java.util.Date objects.
Check out the project on GitHub!
The Grails CodeNarc Plugin has been updated to version 1.2 as well.