HTHou commented on code in PR #46:
URL: https://github.com/apache/tsfile/pull/46#discussion_r1520763097


##########
docs/src/zh/Development/Development-Guide.md:
##########
@@ -0,0 +1,452 @@
+<!--
+
+    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
+    
+        http://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.
+
+-->
+# 开发指南
+## 开发约定
+### 代码格式化 (应该没有变化,昊男确认)
+我们使用 [Spotless 
plugin](https://github.com/diffplug/spotless/tree/main/plugin-maven) 和 
[google-java-format](https://github.com/google/google-java-format) 格式化 Java 
代码。你可以通过以下步骤将 IDE 配置为在保存时自动应用格式以 IDEA 为例):
+1.下载 [google-java-format-plugin 
v1.7.0.5](https://plugins.jetbrains.com/plugin/8527-google-java-format/versions/stable/83169),
 安装到 IDEA(Preferences -> plugins -> search 
google-java-format),更详细的内容请查看[操作手册](https://github.com/google/google-java-format#intellij-android-studio-and-other-jetbrains-ides)
+2.从磁盘安装 (Plugins -> little gear icon -> "Install plugin from disk" -> Navigate 
to downloaded zip file)
+3.开启插件,并保持默认的 GOOGLE 格式 (2-space indents)
+4.在 Spotless 没有升级到 18+之前,不要升级 google-java-format 插件
+5.安装 [Save Actions](https://plugins.jetbrains.com/plugin/7642-save-actions) 插件 
, 并开启插件,打开 "Optimize imports" and "Reformat file" 选项。
+6.在“Save Actions”设置页面中,将 "File Path Inclusion" 设置为 .*.java”, 
避免在编辑的其他文件时候发生意外的重新格式化
+
+### 编码风格 (应该没有变化,昊男确认)
+我们使用 
[maven-checkstyle-plugin](https://checkstyle.sourceforge.io/config_filefilters.html)来保证所有的
 Java 代码风格都遵循在项目根目录下的 
[checkstyle.xml](https://github.com/apache/iotdb/blob/master/checkstyle.xml) 
文件中定义的规则集.
+
+您可以从该文件中查阅到所有的代码风格要求。当开发完成后,您可以使用 `mvn validate` 命令来检查您的代码是否符合代码风格的要求。
+
+另外, 当您在集成开发环境开发时,可能会因为环境的默认代码风格配置导致和本项目的风格规则冲突。
+
+在 IDEA 中,您可以通过如下步骤解决风格规则不一致的问题。
+- 禁用通配符引用
+    - 跳转至 Java 代码风格配置页面 (Preferences... -> 编辑器 -> 代码风格 -> Java)。
+    - 切换到“导入”标签。
+    - 在“常规”部分,启用“使用单个类导入”选项。
+    - 将“将 import 与‘*’搭配使用的类计数”改成 999 或者一个比较大的值。
+    - 将“将静态 import 与‘*’搭配使用的名称计数”改成 999 或者一个比较大的值。
+
+## 贡献方式
+### 参与投票 (问昊男投票方式)
+- 1.给发布版本投票
+  * 非中文用户,请阅读 
https://cwiki.apache.org/confluence/display/IOTDB/Validating+a+staged+Release
+- 2.下载投票的版本/rc下所有内容
+   * https://dist.apache.org/repos/dist/dev/iotdb/
+
+- 3.导入发布经理的公钥
+
+    * https://dist.apache.org/repos/dist/dev/iotdb/KEYS
+
+    * 最下边有 Release Manager (RM) 的公钥
+
+    * 安装 gpg2
+
+  - 第一种方法
+  
+    * 公钥的开头如下
+        ```
+        pub   rsa4096 2019-10-15 [SC]
+            10F3B3F8A1201B79AA43F2E00FC7F131CAA00430
+        ```   
+
+        或是
+        
+        ```
+        pub   rsa4096/28662AC6 2019-12-23 [SC]
+        ```
+
+    * 下载公钥
+
+        ```
+        gpg2 --receive-keys 10F3B3F8A1201B79AA43F2E00FC7F131CAA00430 (或 
28662AC6)
+
+        或 (指定 keyserver) 
+        gpg2 --keyserver p80.pool.sks-keyservers.net --recv-keys 
10F3B3F8A1201B79AA43F2E00FC7F131CAA00430 (或 28662AC6)
+        ```
+
+  - 第二种方法
+    * 把下方内容复制到一个文本文件中,文本名为 ```key.asc```
+
+        * 内容如下:
+            ```
+            -----BEGIN PGP PUBLIC KEY BLOCK-----
+            Version: GnuPG v2
+            ...
+            -----END PGP PUBLIC KEY BLOCK-----
+            ```
+
+            导入 RM 的公钥到自己电脑
+
+            ```
+            gpg2 --import key.asc
+  
+            ```
+
+- 4.验证源码发布版
+
+  * 验证是否有 NOTICE、LICENSE,以及内容是否正确。
+
+  * 验证 README、RELEASE_NOTES
+
+  * 验证 header
+
+    ```
+    mvn -B apache-rat:check
+    ```
+
+  * 验证签名和哈希值
+
+    ```
+    gpg2 --verify apache-iotdb-0.12.0-source-release.zip.asc 
apache-iotdb-0.12.0-source-release.zip
+
+    出现 Good Singnature 
+
+    shasum -a512 apache-iotdb-0.12.0-source-release.zip
+
+    和对应的 .sha512 对比,一样就可以。
+    ```

Review Comment:
   ```suggestion
       ```
       gpg2 --verify apache-tsfile-1.0.0-source-release.zip.asc 
apache-tsfile-1.0.0-source-release.zip
   
       出现 Good Singnature 
   
       shasum -a512 apache-tsfile-1.0.0-source-release.zip
   
       和对应的 .sha512 对比,一样就可以。
       ```
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to