From 181aa1b4a9a603d92c34dcefefb70c94bb2b4fc2 Mon Sep 17 00:00:00 2001 From: morrySnow <101034200+morrySnow@users.noreply.github.com> Date: Sun, 8 May 2022 06:41:46 +0800 Subject: [PATCH] [style]add IntelliJ code style xml (#9438) --- build-support/IntelliJ-code-format.xml | 95 +++++++++++++++++++ docs/en/developer-guide/java-format-code.md | 2 +- .../zh-CN/developer-guide/java-format-code.md | 2 +- 3 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 build-support/IntelliJ-code-format.xml diff --git a/build-support/IntelliJ-code-format.xml b/build-support/IntelliJ-code-format.xml new file mode 100644 index 0000000000..04c4e7a681 --- /dev/null +++ b/build-support/IntelliJ-code-format.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + diff --git a/docs/en/developer-guide/java-format-code.md b/docs/en/developer-guide/java-format-code.md index 267211334a..1ae2996314 100644 --- a/docs/en/developer-guide/java-format-code.md +++ b/docs/en/developer-guide/java-format-code.md @@ -58,6 +58,6 @@ Click the plus sign under Configuration File, select `Use a local Checkstyle fil The automatic formatting function of `IDEA` is also recommended. -Go to `Preferences->Editor->Code Style->Java` click the config sign and select `Import Scheme`,select `CheckStyle Configuration`,and select the `fe/check/checkstyle/checkstyle.xml` file. +Go to `Preferences->Editor->Code Style->Java` click the config sign and select `Import Scheme`,select `IntelliJ IDEA code style XML`,and select the `build-support/IntelliJ-code-format.xml` file. If you use VS Code to develop Java code, please install `Checkstyle for Java` plugin, and config according to the [document](https://code.visualstudio.com/docs/java/java-linting) and the picture. diff --git a/docs/zh-CN/developer-guide/java-format-code.md b/docs/zh-CN/developer-guide/java-format-code.md index f78f95af74..95dd61df78 100644 --- a/docs/zh-CN/developer-guide/java-format-code.md +++ b/docs/zh-CN/developer-guide/java-format-code.md @@ -56,7 +56,7 @@ javax 同时推荐使用 `IDEA` 的自动格式化功能。 -在 `Preferences->Editor->Code Style->Java` 的配置标识点击 `Import Scheme`,点击 `CheckStyle Configuration`,选择项目的 `fe/check/checkstyle/checkstyle.xml` 文件。 +在 `Preferences->Editor->Code Style->Java` 的配置标识点击 `Import Scheme`,点击 `IntelliJ IDEA code style XML`,选择项目的 `build-support/IntelliJ-code-format.xml` 文件。 如果使用 VS Code 进行 Java 开发,请安装 `Checkstyle for Java` 插件,按照[文档](https://code.visualstudio.com/docs/java/java-linting)里的说明和动图进行配置。