Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement](style): polish the checkstyle #9767

Merged
merged 2 commits into from
May 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build-support/IntelliJ-code-format.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ under the License.
-->
<code_scheme name="Doris" version="173">
<JavaCodeStyleSettings>
<option name="LAYOUT_STATIC_IMPORTS_SEPARATELY" value="false" />
<option name="INSERT_INNER_CLASS_IMPORTS" value="true" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
Expand All @@ -32,10 +33,12 @@ under the License.
<emptyLine />
<package name="java" withSubpackages="true" static="false" />
<package name="javax" withSubpackages="true" static="false" />
<emptyLine />
</value>
</option>
<option name="ALIGN_MULTILINE_RECORDS" value="false" />
<option name="ALIGN_TYPES_IN_MULTI_CATCH" value="false" />
<option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
<option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
</JavaCodeStyleSettings>
<ScalaCodeStyleSettings>
<option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/en/developer-guide/java-format-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ Click the plus sign under Configuration File, select `Use a local Checkstyle fil

![](/images/idea-checkstyle-version.png)

**You can use `Checkstyle-IDEA` plugin to check `Checkstyle` of your code real-time.**

![](/images/idea-checkstyle-plugin-en.png)

### VS Code

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
Expand Down
4 changes: 4 additions & 0 deletions docs/zh-CN/developer-guide/java-format-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ standard java package

![](/images/idea-checkstyle-version.png)

**可以使用 `Checkstyle-IDEA` 插件来对代码进行 `Checkstyle` 检测**。

![](/images/idea-checkstyle-plugin-cn.png)

### VS Code

如果使用 VS Code 进行 Java 开发,请安装 `Checkstyle for Java` 插件,按照[文档](https://code.visualstudio.com/docs/java/java-linting)里的说明和动图进行配置。
Expand Down