1 Star 0 Fork 20

linsys / apollo

forked from 一颗小树x / apollo 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CONTRIBUTING.md 3.86 KB
一键复制 编辑 原始数据 按行查看 历史
Fadi88 提交于 2019-11-19 15:23 . fix-link-contributing

How to Contribute to Apollo

Contributor License Agreements

You are welcome to contribute to project Apollo. To contribute to apollo, you have to agree with the Apollo individual contributor license agreement.

How do I start contributing

  • You can follow the standard Github approach to contribute code.
  • There are issues with label "help wanted" that are best to help you get started.
  • If you are currently working on an issue, leave a message to let people know that you are working on it.
  • Before sending in your pull request for review, make sure your changes follow the guidelines mentioned below, namely: license, testing and coding style guidelines.

License

For each new file, please include a license at the top of the file.

Testing

Please include unit tests for the contributed code to prove that your code works correctly, and make sure that your code does not break existing tests. Test files are always named to end with _test.cc, and the test target names in the BUILD file always end with test. Here is an example test file file_test.cc.

You can use command bash apollo.sh test to run all unit tests.

Coding style

  • C/C++ coding style: Apollo adopted the Google C++ Style Guide. Make sure your code conforms to this style guide. You can use command bash apollo.sh lint to check if your code has any style problem.

  • Python coding style: Apollo adopted the Google Python Style Guide. You can use the yapf command yapf -i --style='{based_on_style: google}' foo.py to format a file foo.py.

  • Apollo best coding practice: Please also refer to Apollo Best Coding Practice for more coding practice disciplines.

  • BUILD coding style : you can use command bash apollo.sh buildify to format your BUILD files before you submit.

  • Best coding practice: Follow this guide

Documentation

If your code is not straightforward for other contributors to understand, it is recommended to implement the code in a clear and efficient way, and provide sufficient comments and documentation. Apollo uses doxygen to help generate formatted API Document with command bash apollo.sh doc. Document your code following this guide How to document code.

Commit Message

The first line of commit message should be a one-line summary of the change. A paragraph can be added following the summary to clearly explain the details of the change. If your code fixed an issue, add the issue number to your commit message. An example of a good commit message is:

Replaced algorithm A with algorithm B in apollo/modules/control.

Algorithm B is faster than A because it uses binary search. The runtime is reduced from O(N) to O(log(N)).

Fixes #1234

Before Creating Pull Request

After you finish your code and ready to create a Pull Request, please make sure your change don't break build/test/lint by running bash apollo.sh check, which is equivalent to a combination of bash apollo.sh build, bash apollo.sh test and bash apollo.sh lint.

1
https://gitee.com/linsys/apollo.git
git@gitee.com:linsys/apollo.git
linsys
apollo
apollo
master

搜索帮助