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


##########
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsCodeStylePlugin.groovy:
##########
@@ -90,37 +100,26 @@ class GrailsCodeStylePlugin implements Plugin<Project> {
 
             createOrLoad(
                     toCreate.resolve(CODENARC_CONFIG_FILE_NAME),
-                    
"${BASE_RESOURCE_PATH}/codenarc/${CODENARC_CONFIG_FILE_NAME}"
+                    
"${BASE_RESOURCE_PATH}/codenarc/${CODENARC_CONFIG_FILE_NAME}",
+                    project
             )
 
             directory
         })
     }
 
-    private static void createOrLoad(Path expectedPath, String 
defaultResource) {
-        if (!Files.exists(expectedPath) || expectedPath.size() == 0) {
-            def defaultValue = 
GrailsCodeStylePlugin.getResourceAsStream(defaultResource)
-            if (!defaultValue) {
-                throw new IllegalStateException("Could not locate default 
configuration file: ${defaultResource}")
-            }
-            expectedPath.text = defaultValue.text
-        }
-    }
-
-    private static void doNotApplyStylingToTests(Project project) {
-        project.tasks.named('checkstyleTest') {
-            it.enabled = false // Do not check test sources at this time
+    private static void createOrLoad(Path expectedPath, String 
defaultResource, Project project) {

Review Comment:
   The changes to this method should be reverted.  



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