dfhack/docs/Contributing.rst

60 lines
2.2 KiB
ReStructuredText

.. _contributing:
2015-09-22 08:06:56 -06:00
###########################
How to contribute to DFHack
###########################
2020-07-08 00:13:37 -06:00
.. contents:: Contents
:local:
.. _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-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.
* LF (Unix style) line terminators
2015-01-31 19:38:42 -07:00
* Avoid trailing whitespace
* 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.
How to get new code into DFHack
-------------------------------
* 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
* It must pass CI - run ``python travis/all.py`` to check this.
* 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.
* Create a GitHub pull request once finished
* 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.
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!