tanya/CONTRIBUTING.md

108 lines
4.0 KiB
Markdown
Raw Permalink Normal View History

2017-10-21 14:36:34 +02:00
# Contributing
Tanya is a project in active development, therefore any help is appreciated. Thank you for considering contributing
to it, feel welcome.
These guidelines describe ways to get started.
2017-06-21 15:05:39 +02:00
## Ways to get involved
2017-10-21 14:36:34 +02:00
* **Reporting a problem**: [Report](https://github.com/caraus-ecms/tanya/issues) bugs and usage problems you
encounter.
2017-10-21 14:36:34 +02:00
* **Fixing issues**: [The bug tracker](https://github.com/caraus-ecms/tanya/issues) contains a list of issues you
can work on.
* **Documentation**: You can improve API documentation by correcting grammar errors, completing existing texts and
writing new ones, or providing usage examples.
* **Testing**: Test coverage is important for a library. Writing tests is not only helpful, but is also a great way
to get a feel for how tanya works.
* **Adding new features**: Tanya is a growing library. If you think some feature is missing, you can suggest
and implement this.
2017-06-21 15:05:39 +02:00
## Opening an issue
2017-10-21 14:36:34 +02:00
If you have found a bug, an error, have some question, or suggestion,
[Open an issue](https://github.com/caraus-ecms/tanya/issues). I'll try to answer as soon as I can. There is also a
list of open issues that mirror the current development process and progress. If you're looking for a challenge, just
2017-06-21 15:05:39 +02:00
pick an issue you are interested in and start working on it. Fill free to comment on the issue to get more
information.
2017-10-21 14:36:34 +02:00
You can also look at the [milestones](https://github.com/Dlackware/gnome/milestones) to see what is planned for a
specific release.
2017-06-21 15:05:39 +02:00
## Contribution process
2017-06-21 15:05:39 +02:00
### Creating a pull request
I accept GitHub pull requests. Creating a pull request is like sending a patch with the suggested change.
2017-06-21 15:05:39 +02:00
First you have to [fork](https://guides.github.com/activities/forking/) the repository. Clone your fork locally
2017-10-21 14:36:34 +02:00
with `git clone` and create a new branch where you want to work. For example:
2017-06-21 15:05:39 +02:00
```shell
git checkout -b bugfix-x
```
Commit your changes to your fork:
```shell
git commit -m "Fix X"
2017-06-21 15:05:39 +02:00
git push -u origin bugfix-x
```
2017-06-21 15:05:39 +02:00
After that if you visit your fork on GitHub, GitHub will suggest to create pull request. Just follow the steps
described on GitHub to finish the process. See
[Using Pull Requests](https://help.github.com/articles/about-pull-requests/) for more information.
2017-06-21 15:05:39 +02:00
2017-07-19 07:58:20 +02:00
Please ensure that your fork is even with the upstream (original) repository. If not, you have to rebase your branch
2017-10-21 14:36:34 +02:00
on upstream/master before submitting the pull request. See [Syncing a fork](https://help.github.com/articles/syncing-a-fork/) for a
2017-06-21 15:05:39 +02:00
step-by-step guide.
### Fixing a bug
2017-10-21 14:36:34 +02:00
Add a unit test that demonstrates the bug along with a short description or link to the original bug.
### Adding new features
* Use Ddoc to document the feature.
* Add some unit tests to prevent bugs.
* [Documented D unit tests](https://dlang.org/spec/ddoc.html#using_ddoc_to_generate_examples) go into the documentation and can be used as an usage
example. These tests should be readable and not complicated since they demonstrate how the feature is supposed to work.
* More advanced tests should be put into a separate not documented unittest block.
### Writing unit tests
```d
2017-10-21 14:36:34 +02:00
///
unittest
{
2017-10-21 14:36:34 +02:00
// A documented unit test has three slashes in front of it.
}
2017-10-21 14:36:34 +02:00
// Issue ##: https://github.com/caraus-ecms/tanya/issues/##.
unittest
{
// Not documented unit test may still have a description.
}
```
### Style guide
Make sure your changes follow [The D Style](https://dlang.org/dstyle.html) (including
2017-10-21 14:36:34 +02:00
[Additional Requirements for Phobos](https://dlang.org/dstyle.html#phobos)).
You can also use [dscanner](https://github.com/dlang-community/D-Scanner) to test the new code against the
most guidlines. The root of this repository contains
[dscanner.ini](https://github.com/caraus-ecms/tanya/blob/master/dscanner.ini), configuration file with settings for an
automatic style check. Just go to the top-level directory and issue (this assumes `dscanner` is installed in your
system):
2017-10-21 14:36:34 +02:00
```shell
dscanner --styleCheck source
```
2017-06-21 15:05:39 +02:00
## Questions and suggestions
2017-10-21 14:36:34 +02:00
* [Open an issue](https://github.com/caraus-ecms/tanya/issues)
* [Send an email](mailto:info@caraus.de)