jdaugherty commented on code in PR #15404:
URL: https://github.com/apache/grails-core/pull/15404#discussion_r2828163472


##########
grails-doc/src/en/guide/toc.yml:
##########
@@ -304,6 +304,7 @@ testing:
     usefulProperties: Useful Properties
   integrationTesting: Integration Testing
   functionalTesting: Functional Testing
+  codeQuality: Code Quality with CodeNarc

Review Comment:
   code narc isn't specific to testing; it's code analysis & code styling. I'd 
suggest we create a new subsection called "Building a Successful Application" 
or something similar.  Then we can nest the following sections long term 
(descriptions are a suggestion here): 
   
   1. (existing) Testing
   2. Code Analysis & Styling
       - for Groovy
       - for Java
   3. (this PR) Code Analysis & Styling for Groovy
   4. Continuous Integration (CI)
   5. Publishing Snapshots & Releases
   6. Maintaining a Change Log
   7. Using .sdkmanrc for easier tooling selection
   
   Typing this out reminded me: we added checkstyle since codenarc is groovy 
specific. I updated the above suggestion that we call this out as groovy 
specific.
   
   I'd also not mention codenarc as a section header, I'd rather it be an 
implementation detail of the overall goal.



##########
grails-doc/src/en/guide/testing/codeQuality.adoc:
##########
@@ -0,0 +1,157 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+////
+
+https://codenarc.org/[CodeNarc] is a static analysis tool for Groovy that 
finds defects, poor coding practices, inconsistencies, style issues, and more. 
Grails projects can integrate CodeNarc via the Gradle 
https://docs.gradle.org/current/userguide/codenarc_plugin.html[CodeNarc plugin].
+
+==== Adding CodeNarc to Your Build
+
+Apply the CodeNarc plugin in your `build.gradle`:
+
+[source,groovy]
+----
+plugins {
+    id 'codenarc'
+}
+
+dependencies {
+    codenarc 'org.codenarc:CodeNarc:3.6.0-groovy-4.0'
+}
+
+codenarc {

Review Comment:
   This doesn't look like it's been updated to use the extension best 
practices.  If we want to merge this, I can take a second pass at this in a 
subsequent PR.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to