2020-07-08 21:38:18 -06:00
|
|
|
.. _contributing:
|
|
|
|
|
2015-09-22 08:06:56 -06:00
|
|
|
###########################
|
|
|
|
How to contribute to DFHack
|
|
|
|
###########################
|
2015-01-22 21:05:46 -07:00
|
|
|
|
2020-07-08 00:13:37 -06:00
|
|
|
.. contents:: Contents
|
|
|
|
:local:
|
2015-09-24 00:58:02 -06:00
|
|
|
|
2015-12-14 23:08:25 -07:00
|
|
|
.. _contributing-code:
|
|
|
|
|
2015-09-22 08:06:56 -06:00
|
|
|
Contributing Code
|
|
|
|
=================
|
|
|
|
Several things should be kept in mind when contributing code to DFHack.
|
2015-01-22 21:05:46 -07:00
|
|
|
|
2015-01-27 13:12:46 -07:00
|
|
|
Code Format
|
|
|
|
-----------
|
2015-01-31 20:50:37 -07:00
|
|
|
* Four space indents for C++. Never use tabs for indentation in any language.
|
2015-01-22 21:05:46 -07:00
|
|
|
* LF (Unix style) line terminators
|
2015-01-31 19:38:42 -07:00
|
|
|
* Avoid trailing whitespace
|
2015-01-22 21:05:46 -07:00
|
|
|
* UTF-8 encoding
|
2015-01-27 13:12:46 -07:00
|
|
|
* For C++:
|
|
|
|
|
2015-01-31 19:38:42 -07:00
|
|
|
* Opening and closing braces on their own lines or opening brace at the end of the previous line
|
2015-01-31 21:04:35 -07:00
|
|
|
* Braces placed at original indent level if on their own lines
|
2015-09-22 08:06:56 -06:00
|
|
|
* #includes should be sorted. C++ libraries first, then dfhack modules, then df structures,
|
|
|
|
then local includes. Within each category they should be sorted alphabetically.
|
2015-01-22 21:05:46 -07:00
|
|
|
|
|
|
|
How to get new code into DFHack
|
|
|
|
-------------------------------
|
2015-11-06 17:35:44 -07:00
|
|
|
* Submit pull requests to the ``develop`` branch, not the ``master`` branch.
|
|
|
|
(The ``master`` branch always points at the most recent release)
|
|
|
|
* Use a new branch for each feature or bugfix so that your changes can be merged independently
|
|
|
|
(i.e. not the master or develop branch of your fork).
|
2015-09-22 08:06:56 -06:00
|
|
|
* If possible, compile on multiple platforms when changing anything that compiles
|
2015-11-06 17:35:44 -07:00
|
|
|
* It must pass CI - run ``python travis/all.py`` to check this.
|
2020-07-06 23:54:59 -06:00
|
|
|
* Update documentation when applicable - see `docs-standards` for details.
|
2018-04-02 20:22:20 -06:00
|
|
|
* Update ``changelog.txt`` and ``docs/Authors.rst`` when applicable. See
|
|
|
|
`build-changelog` for more information on the changelog format.
|
2015-10-03 11:50:52 -06:00
|
|
|
* Create a GitHub pull request once finished
|
2015-11-06 17:35:44 -07:00
|
|
|
* Submit ideas and bug reports as :issue:`issues on GitHub <>`.
|
|
|
|
Posts in the forum thread can easily get missed or forgotten.
|
|
|
|
* Work on :issue:`reported problems <?q=is:open+-label:idea>`
|
|
|
|
will take priority over ideas or suggestions.
|
2015-01-22 21:05:46 -07:00
|
|
|
|
|
|
|
|
2015-10-03 11:50:52 -06:00
|
|
|
Other ways to help
|
|
|
|
==================
|
|
|
|
DFHack is a software project, but there's a lot more to it than programming.
|
|
|
|
If you're not comfortable programming, you can help by:
|
|
|
|
|
|
|
|
* reporting bugs and incomplete documentation
|
|
|
|
* improving the documentation
|
|
|
|
* finding third-party scripts to add
|
|
|
|
* writing tutorials for newbies
|
|
|
|
|
|
|
|
All those things are crucial, and often under-represented. So if that's
|
|
|
|
your thing, go get started!
|
|
|
|
|