This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new d015412932f Document : enhance the code conduct document (#20538)
d015412932f is described below
commit d015412932f958e6b0d2b31b5463dc572673ac1d
Author: 孙念君 Nianjun Sun <[email protected]>
AuthorDate: Fri Aug 26 14:29:17 2022 +0800
Document : enhance the code conduct document (#20538)
* Document : enhance the code conduct document
* Document : refactor a word
---
docs/community/content/involved/conduct/code.cn.md | 2 +-
docs/community/content/involved/conduct/code.en.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/community/content/involved/conduct/code.cn.md
b/docs/community/content/involved/conduct/code.cn.md
index a4abc904612..7c5c4fb54c2 100644
--- a/docs/community/content/involved/conduct/code.cn.md
+++ b/docs/community/content/involved/conduct/code.cn.md
@@ -35,7 +35,7 @@ chapter = true
- 三位以内字符的专有名词缩写使用大写,超过三位字符的缩写采用驼峰形式。
-
三位以内字符的类和方法名称缩写的示例:DBDiscoveryExampleScenario、SQL92Lexer、XMLTransfer、MySQLAdminExecutorCreator;
- 三位以上字符的类和方法名称缩写的示例:JdbcUrlAppender、YamlAgentConfigurationSwapper;
- - 变量缩写应该使用小写:dbName、mysqlAuthenticationMethod、sqlStatement、mysqlConfig。
+ - 变量应使用小驼峰形式:dbName、mysqlAuthenticationMethod、sqlStatement、mysqlConfig。
- 返回值变量使用 `result` 命名;循环中使用 `each` 命名循环变量;map 中使用 `entry` 代替 `each`。
- 捕获的异常名称命名为 `ex` ;捕获异常且不做任何事情,异常名称命名为 `ignored`。
- 配置文件使用 `Spinal Case` 命名(一种使用 `-` 分割单词的特殊 `Snake Case`)。
diff --git a/docs/community/content/involved/conduct/code.en.md
b/docs/community/content/involved/conduct/code.en.md
index c8d9352d955..c22ebe77884 100644
--- a/docs/community/content/involved/conduct/code.en.md
+++ b/docs/community/content/involved/conduct/code.en.md
@@ -32,7 +32,7 @@ The following code of conduct is based on full compliance
with [ASF CODE OF COND
- Abbreviation composed less than 3 characters should be uppercase, more than
3 characters must use camel case naming rule.
- Example for abbreviation composed less than 3 characters:
DBDiscoveryExampleScenario, SQL92Lexer, XMLTransfer, MySQLAdminExecutorCreator;
- Example for abbreviation composed more than 3 characters:
JdbcUrlAppender, YamlAgentConfigurationSwapper;
- - A variable composed of abbreviation should be lowercase: dbName,
mysqlAuthenticationMethod, sqlStatement, mysqlConfig.
+ - A variable composed of abbreviation should use lower camel case: dbName,
mysqlAuthenticationMethod, sqlStatement, mysqlConfig.
- Return values are named with `result`; Variables in the loop structure are
named with `each`; Replace `each` with `entry` in map.
- Exceptions when catch are named with `ex`; Exceptions when catch but do
nothing are named with `ignored`.
- Name property files with `Spinal Case`(a variant of `Snake Case` which uses
hyphens `-` to separate words).