2022-10-01 16:24:52 +08:00
# Contributing to axmol
2014-11-07 06:16:39 +08:00
## For general questions
You can ask general questions by using:
2022-10-01 16:24:52 +08:00
- Forum (preferred way): https://github.com/axmolengine/axmol/discussions
2014-11-07 06:16:39 +08:00
## Reporting bugs
2022-10-01 16:24:52 +08:00
To report bugs, please use the [Issue Tracker ](https://github.com/axmolengine/axmol/issues )
2014-11-07 06:16:39 +08:00
Steps to report a bug:
2022-10-01 16:24:52 +08:00
* Open the [url ](https://github.com/axmolengine/axmol/issues/new )
2014-12-04 15:46:04 +08:00
* Add all the needed information to reproduce the bug, the information include
2014-12-04 15:47:05 +08:00
* engine version
* steps to reproduce the bug
* some pseudocode
* resources link if needed
2014-11-07 06:16:39 +08:00
## Submitting patches
If you want to contribute code, please follow these steps:
(If you are new to git and/or GitHub, you should read [Pro Git ](http://progit.org/book/ ) , especially the section on [Contributing to a project:Small/Large Public Project ](http://progit.org/book/ch5-2.html#public_small_project ) )
2022-10-01 16:24:52 +08:00
- Download the latest axmol develop branch from github:
2014-11-07 06:16:39 +08:00
```
2022-10-01 16:24:52 +08:00
$ git clone git://github.com/axmolengine/axmol.git
$ cd axmol
2022-03-18 11:01:40 +08:00
$ git checkout dev
2014-11-07 06:16:39 +08:00
```
- Apply your changes in the recently downloaded repository
- Commit your changes in your own repository
- Create a new branch with your patch: `$ git checkout -b my_fix_branch`
- Push your new branch to your public repository
2022-10-01 16:24:52 +08:00
- Send a “pull request” to user “axmol”
2014-11-07 06:16:39 +08:00
- It must be _complete_ . See the definition below
- It must follow the _Releases_ rules. See the definition below
## Only _complete_ patches will be merged
The patch must be _complete_ . And by that, we mean:
2022-10-01 16:24:52 +08:00
- For C++ code follow the [axmol C++ Coding Style][1]
2014-11-18 04:30:53 +08:00
- For Python code follow the [PEP8 guidelines][3]
2014-11-07 06:16:39 +08:00
- Describe what the patch does
2014-11-18 04:30:53 +08:00
- Include test cases if applicable
2014-11-07 06:16:39 +08:00
- Include unit tests if applicable
- Must be tested in all supported platforms [*]
- Must NOT degrade the performance
- Must NOT break existing tests cases
- Must NOT break the Continuous Integration build
- Must NOT break backward compatibility
- Must compile WITHOUT warnings
- New APIs MUST be **easy to use** , **familiar** to cocos2d-x users
2014-11-17 13:06:23 +08:00
- Code MUST be **easy to extend** and **maintain**
2014-11-18 04:30:53 +08:00
- Must have documentation: C++ APIs must use Doxygen strings, tools must have a README.md file that describe how to use the tool
2014-11-07 06:16:39 +08:00
- Must be efficient (fast / low memory needs)
- It must not duplicate existing code, unless the new code deprecates the old one
- Patches that refactor key components will only be merged in the next major versions.
[*]: If you don't have access to test your code in all the supported platforms, let us know.
2014-11-25 13:40:12 +08:00
__TBD__: Is this applicable for big features ? What is the best way to merge big features ?