|
| 1 | +# How to contribute to BlocksDS |
| 2 | + |
| 3 | +Thanks for wanting to spend your time helping this project! The instructions |
| 4 | +below are just a guide of how to do things in an ideal world. In practice, you |
| 5 | +don't need to follow them perfectly for your bug reports and your pull requests |
| 6 | +to be valuable. |
| 7 | + |
| 8 | +## Reporting bugs |
| 9 | + |
| 10 | +Bug reports for any of the repositories in the BlocksDS organization must be |
| 11 | +created in the [`blocksds/sdk`](https://github.com/blocksds/sdk/issues) |
| 12 | +repository. |
| 13 | + |
| 14 | +Give enough information to reproduce the bug. For example, depending on the |
| 15 | +problem, you may need to mention: |
| 16 | + |
| 17 | +- Which OS you use. |
| 18 | +- Which version of BlocksDS you use (have you upgraded to the most recent |
| 19 | + version? |
| 20 | +- Is your bug report related to BlocksDS (the Nintendo DS libraries and tools in |
| 21 | + the BlocksDS repository) or Wonderful Toolchain (the toolchain, which includes |
| 22 | + the compiler, assembler, etc)? If it's related to Wonderful Toolchain, check |
| 23 | + [this link](https://wonderful.asie.pl/wiki/doku.php?id=community). |
| 24 | +- Can you create a minimal example that shows the problem? |
| 25 | + |
| 26 | +## Contributing with pull requests |
| 27 | + |
| 28 | +### Bug fixes |
| 29 | + |
| 30 | +If you want to contribute a bug fix, simply fork the affected repository and |
| 31 | +open a pull request! It would be great if you could also provide a test or |
| 32 | +example that shows the bug in action before the fix, and the bug gone after the |
| 33 | +fix. |
| 34 | + |
| 35 | +### New features |
| 36 | + |
| 37 | +If you're going to contribute a new feature, it's a good idea to discuss it |
| 38 | +first with the maintainers rather than creating a pull request with a lot of |
| 39 | +code with no warning. The [issue tracker](https://github.com/blocksds/sdk/issues) |
| 40 | +of `blocksds/sdk` contains a list of known missing features. Other developers |
| 41 | +may have already had a discussion about the feature you want to implement. |
| 42 | + |
| 43 | +### General contribution advice |
| 44 | + |
| 45 | +When writing code, try to match the style of the pre-existing code (use spaces, |
| 46 | +not tabs, be careful with your curly braces, etc). Small deviations of the |
| 47 | +pre-existing style are generally allowed, but you are expected to match the |
| 48 | +style as much as possible. |
| 49 | + |
| 50 | +Please, try to create clean commits with good commit messages. Not every commit |
| 51 | +needs to be perfect, but having good commit messages is important. |
| 52 | + |
| 53 | +If you're adding a function, Don't create a pull request with 10 commits with |
| 54 | +small incremental changes to the function. Instead, squash them into commits |
| 55 | +that contain self-contained changes. For example, a PR that fixes a bug in the |
| 56 | +texture allocation code and adds a function to get some information from |
| 57 | +textures will probably need two commits (one to fix the bug, another one to add |
| 58 | +the new function). |
| 59 | + |
| 60 | +Good commit messages start with the part of the code that is being modified and |
| 61 | +is followed by a very short description of the change. For example, `build: Fix |
| 62 | +install target in makefile` is a good commit message. If you need inspiration, |
| 63 | +check the commit messages that are already in the repository. |
| 64 | + |
| 65 | +If the short message isn't good enough to describe the change, add as much text |
| 66 | +as you want to the body of the commit message. |
| 67 | + |
| 68 | +You can read more about how to write good commit messages in |
| 69 | +[this link](https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/). |
| 70 | + |
| 71 | +When you're ready to submit your pull request it's a good idea to rebase it on |
| 72 | +top of the current `master` branch: `git fetch origin && git rebase origin/master` |
| 73 | + |
| 74 | +Be prepared to rework your branch if you are requested to change things in the |
| 75 | +pull request review process. `git rebase --interactive origin/master` is a very |
| 76 | +useful tool when you need to squash commits, reorder them, change their |
| 77 | +messages, etc. |
| 78 | + |
| 79 | +## Contacting the developers |
| 80 | + |
| 81 | +Whether you want to report a bug report or contribute code to BlocksDS it may be |
| 82 | +a good idea to talk to the developers of BlocksDS first (for example, in |
| 83 | +[Discord](https://blocksds.skylyrac.net/docs/introduction/support/)). |
| 84 | + |
| 85 | +In general it's better to report bugs in the GitHub issue tracker than in a |
| 86 | +chat. Chat discussions get forgotten quickly, GitHub issues remain there until |
| 87 | +they are closed. |
0 commit comments