jdaugherty commented on code in PR #15555:
URL: https://github.com/apache/grails-core/pull/15555#discussion_r3117541839
##########
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsCodeStylePlugin.groovy:
##########
@@ -107,23 +100,6 @@ class GrailsCodeStylePlugin implements Plugin<Project> {
}
}
- private static void doNotApplyStylingToTests(Project project) {
Review Comment:
This needs to stay. We decided as a project to not yet do styling changes
to the tests.
##########
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsFormatPlugin.groovy:
##########
@@ -0,0 +1,98 @@
+/*
+ * 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.
+ */
+package org.apache.grails.buildsrc
+
+import groovy.transform.CompileStatic
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.tasks.Copy
+import org.gradle.process.ExecSpec
+import org.gradle.process.ExecOperations
+import javax.inject.Inject
+import org.apache.tools.ant.taskdefs.condition.Os
+
+@CompileStatic
+class GrailsFormatPlugin implements Plugin<Project> {
+
+ @Override
+ void apply(Project project) {
+ registerFormattingTasks(project)
+ }
+
+ private static void registerFormattingTasks(Project project) {
Review Comment:
I think self-descriptive method names are great. However, if you're going
to have 1 method that does everything it's less useful. Let's split this
method into 2 and then call those 2 methods from apply?
registerGitHooks(project)
registerFormattingTasks(project)
--
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]