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


##########
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:
   Done. Created a new top-level "Building a Successful Application" section 
and moved the doc there as "Code Analysis and Styling for Groovy" - CodeNarc is 
now an implementation detail, not the section name. The structure supports 
adding Java (Checkstyle), CI, publishing, etc. as sibling sections later.



##########
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:
   Updated to use extensions.configure(CodeNarcExtension) matching the 
grails-server-timing pattern. Also updated the test ruleset config to use 
tasks.named() API and added grails-server-timing as a reference for the 
complete build-logic setup with both CodeNarc and Checkstyle.



-- 
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