This is an automated email from the ASF dual-hosted git repository.

matrei pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git


The following commit(s) were added to refs/heads/7.0.x by this push:
     new 6f742f5964 Formatting helpers (#15034)
6f742f5964 is described below

commit 6f742f59648a0b1aa8ccea367e5ec0c7fbe7b371
Author: Mattias Reichel <mat...@apache.org>
AuthorDate: Mon Sep 1 14:39:11 2025 +0200

    Formatting helpers (#15034)
    
    * chore: add initial code formatting helper files
    
    * chore: add license headers to code style files
    
    * chore(codestyle): rm `spaces_around_brackets`
---
 .editorconfig                        | 26 +++++++++++
 .gitignore                           |  5 +-
 .idea/codeStyles/Project.xml         | 91 ++++++++++++++++++++++++++++++++++++
 .idea/codeStyles/codeStyleConfig.xml | 25 ++++++++++
 4 files changed, 146 insertions(+), 1 deletion(-)

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..4c509b592c
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,26 @@
+#
+#  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.
+#
+root = true
+
+[*.{groovy,java}]
+indent_size = 4
+indent_style = space
+insert_final_newline = true
+spaces_around_operators = true
+wildcard_import_limit = 999
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index fe972546d3..4ced48d7f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,9 @@
 .gradle/
 .idea
 .idea/
+!.idea/codeStyles/
+!.idea/codeStyles/Project.xml
+!.idea/codeStyles/codeStyleConfig.xml
 .project
 .settings
 /*/*.iml
@@ -55,4 +58,4 @@ tmp/
 !grails-fields/src/main/groovy/org/grails/scaffolding/registry/output
 !etc/bin
 etc/bin/results
-.vscode/
\ No newline at end of file
+.vscode/
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000000..8f0cf896b7
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,91 @@
+<!--
+
+     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.
+
+-->
+<component name="ProjectCodeStyleConfiguration">
+  <code_scheme name="Project" version="173">
+    <GroovyCodeStyleSettings>
+      <option name="ENABLE_GROOVYDOC_FORMATTING" value="false" />
+      <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
+      <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
+      <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
+        <value />
+      </option>
+      <option name="IMPORT_LAYOUT_TABLE">
+        <value>
+          <package name="java" withSubpackages="true" static="false" />
+          <emptyLine />
+          <package name="javax" withSubpackages="true" static="false" />
+          <emptyLine />
+          <package name="groovy" withSubpackages="true" static="false" />
+          <package name="org.apache.groovy" withSubpackages="true" 
static="false" />
+          <package name="org.codehaus.groovy" withSubpackages="true" 
static="false" />
+          <emptyLine />
+          <package name="jakarta" withSubpackages="true" static="false" />
+          <emptyLine />
+          <package name="" withSubpackages="true" static="false" />
+          <emptyLine />
+          <package name="io.spring" withSubpackages="true" static="false" />
+          <package name="org.springframework" withSubpackages="true" 
static="false" />
+          <emptyLine />
+          <package name="grails" withSubpackages="true" static="false" />
+          <package name="org.apache.grails" withSubpackages="true" 
static="false" />
+          <package name="org.grails" withSubpackages="true" static="false" />
+          <emptyLine />
+          <package name="" withSubpackages="true" static="true" />
+        </value>
+      </option>
+    </GroovyCodeStyleSettings>
+    <JavaCodeStyleSettings>
+      <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
+      <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
+      <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
+        <value />
+      </option>
+      <option name="IMPORT_LAYOUT_TABLE">
+        <value>
+          <package name="java" withSubpackages="true" static="false" />
+          <emptyLine />
+          <package name="javax" withSubpackages="true" static="false" />
+          <emptyLine />
+          <package name="groovy" withSubpackages="true" static="false" />
+          <package name="org.apache.groovy" withSubpackages="true" 
static="false" />
+          <package name="org.codehaus.groovy" withSubpackages="true" 
static="false" />
+          <emptyLine />
+          <package name="jakarta" withSubpackages="true" static="false" />
+          <emptyLine />
+          <package name="" withSubpackages="true" static="false" />
+          <emptyLine />
+          <package name="io.spring" withSubpackages="true" static="false" />
+          <package name="org.springframework" withSubpackages="true" 
static="false" />
+          <emptyLine />
+          <package name="grails" withSubpackages="true" static="false" />
+          <package name="org.apache.grails" withSubpackages="true" 
static="false" />
+          <package name="org.grails" withSubpackages="true" static="false" />
+          <emptyLine />
+          <package name="" withSubpackages="true" static="true" />
+        </value>
+      </option>
+      <option name="ENABLE_JAVADOC_FORMATTING" value="false" />
+    </JavaCodeStyleSettings>
+    <editorconfig>
+      <option name="ENABLED" value="false" />
+    </editorconfig>
+  </code_scheme>
+</component>
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml 
b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000000..52768fe1ae
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,25 @@
+<!--
+
+     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.
+
+-->
+<component name="ProjectCodeStyleConfiguration">
+  <state>
+    <option name="USE_PER_PROJECT_SETTINGS" value="true" />
+  </state>
+</component>
\ No newline at end of file

Reply via email to