From d6e88955c284ca47e8ff6eb9f8e32fdfcc4d5725 Mon Sep 17 00:00:00 2001 From: Stalary <452024236@qq.com> Date: Tue, 3 May 2022 22:38:45 +0800 Subject: [PATCH] [doc] Implement java-format-code.md for IDEA (#9349) --- docs/en/developer-guide/java-format-code.md | 6 +++++- docs/zh-CN/developer-guide/java-format-code.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/en/developer-guide/java-format-code.md b/docs/en/developer-guide/java-format-code.md index 6842c75418..267211334a 100644 --- a/docs/en/developer-guide/java-format-code.md +++ b/docs/en/developer-guide/java-format-code.md @@ -54,6 +54,10 @@ If you use `IDEA` to develop Java code, please install `Checkstyle-IDEA` plugin. Setting the `checkstyle.xml` file in `Tools->Checkstyle`. -Click the plus sign under Configuration File, Select `Use a local Checkstyle file`, and select the `fe/checkstyle.xml` file. +Click the plus sign under Configuration File, select `Use a local Checkstyle file`, and select the `fe/check/checkstyle/checkstyle.xml` file. + +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. 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 8819c4adb8..f78f95af74 100644 --- a/docs/zh-CN/developer-guide/java-format-code.md +++ b/docs/zh-CN/developer-guide/java-format-code.md @@ -52,7 +52,11 @@ javax 如果使用 `IDEA` 进行 Java 开发,请在设置中安装 `Checkstyle-IDEA` 插件。 -在 `Tools->Checkstyle` 的 `Configuration File` 里点击 `Use a local Checkstyle file`,选择项目的 `fe/checkstyle.xml` 文件。 +在 `Tools->Checkstyle` 的 `Configuration File` 里点击 `Use a local Checkstyle file`,选择项目的 `fe/check/checkstyle/checkstyle.xml` 文件。 + +同时推荐使用 `IDEA` 的自动格式化功能。 + +在 `Preferences->Editor->Code Style->Java` 的配置标识点击 `Import Scheme`,点击 `CheckStyle Configuration`,选择项目的 `fe/check/checkstyle/checkstyle.xml` 文件。 如果使用 VS Code 进行 Java 开发,请安装 `Checkstyle for Java` 插件,按照[文档](https://code.visualstudio.com/docs/java/java-linting)里的说明和动图进行配置。