jdaugherty commented on PR #14903: URL: https://github.com/apache/grails-core/pull/14903#issuecomment-3070813605
The style being applied is the style in grails-forge. It has this useful information on why this style was chosen: Checkstyle configuration that checks the sun coding conventions from: - the Java Language Specification at http://java.sun.com/docs/books/jls/second_edition/html/index.html - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - the Javadoc guidelines at http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - some best practices A couple pain points with this: * I'm only reformatting java & groovy production files. This change will only validate the java files - codenarc will do groovy and have to come after. Tests are being done in a later PR. * redundant declarations (final) are forced to be removed * ordering of the variable type matters (static comes before instance, public comes before private, etc) * inner class declarations must occur at the end of the file * inline assignments are discouraged * empty if statements are discouraged (at least add a comment) * static, final variables need to follow the upper case convention * accessors are supposed to exist for any public field on a java class (although , I've turned off check style for anything that would be considered a breaking change) * the JLS specifies the order of modifiers - public, abstract, static, final, etc - and they seem to be wrong in the grails code base * the older array syntax needs updated - ie `char myVar[]` vs `char[] myVar` ... did anyone else forget Java originally supported this? * javadoc has to be formatted correctly - when having code in javadoc, you still have to have the asterisk on each line or the reformat will collapse it to a single line. * I'm converting wildcard to single imports per previous discussion * duplicate lines seem to exist throughout the project (historical merges, etc). These have to be removed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@grails.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org