Development guide

This commit is contained in:
V2Ray 2015-09-30 23:54:21 +02:00
parent 365baa0c6a
commit 5f58f44c30
2 changed files with 47 additions and 0 deletions

View File

@ -28,6 +28,7 @@ V2Ray 是一个翻墙工具包,用于简化和复用其它翻墙工具,加
* [概要设计](https://github.com/V2Ray/v2ray-core/blob/master/spec/design.md)
* [开发计划](https://github.com/V2Ray/v2ray-core/blob/master/spec/roadmap.md)
* [Help Wanted](https://github.com/v2ray/v2ray-core/labels/help%20wanted)所有被标记为“Help Wanted”的 Issue 都接受 Pull Request如果你对本项目感兴趣并想做点贡献请挑选其中之一完善之不甚感激。
* [开发指引](https://github.com/V2Ray/v2ray-core/blob/master/spec/develop.md)
## 联系方式
* Twitterhttps://twitter.com/projectv2ray

46
spec/develop.md Normal file
View File

@ -0,0 +1,46 @@
# 开发指引
## 基本
### 版本控制
Git
### Branch
本项目只使用一个 Branchmaster。所有更改全部提交进 master并确保 master 在任一时刻都是可编译可使用的。
### 引用其它项目
* golang
* 产品代码只能使用 golang 的标准库,即名称不包含任何网址的包;
* 测试代码可以使用 golang.org/x/...
* 如需引用其它项目请事先创建 Issue 讨论;
* 其它
* 只要不违反双方的协议(本项目为 MIT且对项目有帮助的工具都可以使用。
## 开发流程
### 写代码之前
发现任何问题,或对项目有任何想法,请立即[创建 Issue](https://github.com/V2Ray/v2ray-core/blob/master/spec/issue.md) 讨论之,以减少重复劳动和消耗在代码上的时间。
### 修改代码
* golang
* 请参考 [Effective Go](https://golang.org/doc/effective_go.html)
* 每一次 commit 之前请运行: gofmt -w github.com/v2ray/v2ray-core/
* 每一次 commit 之前请确保测试通过: go test github.com/v2ray/v2ray-core/...
* 提交 PR 之前请确保新增代码有超过 60% 的代码覆盖率code coverage
* 其它
* 请注意代码的可读性
### Pull Request
提交 PR 之前请先运行 git pull 以确保 merge 可顺利进行。
## 对代码的修改
### 功能性问题
请提交至少一个测试用例test case来验证对现有功能的改动。
### 性能相关
请提交必要的测试数据来证明现有代码的性能缺陷,或是新增代码的性能提升。
### 其它
视具体情况而定。