|
1 | | -## How to contribute to LINE Bot SDK for Ruby project |
| 1 | +# How to contribute to LINE Bot SDK for Ruby project |
2 | 2 |
|
3 | | -First of all, thank you so much for taking your time to contribute! LINE Bot SDK for Ruby is not very different from any other open |
| 3 | +First of all, thank you so much for taking your time to contribute! LINE Bot SDK for Ruby is not very different |
| 4 | +from any other open |
4 | 5 | source projects you are aware of. It will be amazing if you could help us by doing any of the following: |
5 | 6 |
|
6 | | -- File an issue in [the issue tracker](https://github.com/line/line-bot-sdk-ruby/issues) to report bugs and propose new features and |
| 7 | +- File an issue in [the issue tracker](https://github.com/line/line-bot-sdk-ruby/issues) to report bugs and |
| 8 | + propose new features and |
7 | 9 | improvements. |
8 | 10 | - Ask a question using [the issue tracker](https://github.com/line/line-bot-sdk-ruby/issues). |
9 | 11 | - Contribute your work by sending [a pull request](https://github.com/line/line-bot-sdk-ruby/pulls). |
10 | 12 |
|
| 13 | +## Development |
| 14 | + |
| 15 | +### YARD |
| 16 | + |
| 17 | +We use [YARD](https://yardoc.org) to generate and maintain our code documentation. |
| 18 | +**Please make sure your new or modified code is also covered by proper YARD doc comments.** |
| 19 | +Good documentation ensures that contributors and users can easily read and understand how the methods and classes work. |
| 20 | + |
| 21 | +#### How to generate and view documentation locally |
| 22 | + |
| 23 | +##### 1. **Start a local documentation server** |
| 24 | + |
| 25 | +Run the following command to start a local YARD server that will automatically reload when files change: |
| 26 | + |
| 27 | +```bash |
| 28 | +bundle exec yard server --reload |
| 29 | +``` |
| 30 | + |
| 31 | +Then open the printed URL in your browser (e.g., http://localhost:8808). |
| 32 | + |
| 33 | +##### 2. **Validate your documentation** |
| 34 | + |
| 35 | +Before pushing your changes, run the following command to check YARD documentation coverage and warnings: |
| 36 | +```bash |
| 37 | +bundle exec yard stats ./lib/line/bot/v2 --fail-on-warning |
| 38 | +``` |
| 39 | +This will fail if there are missing doc comments or any YARD-specific warnings. |
| 40 | +Make sure to fix any issues before creating a pull request. |
| 41 | + |
| 42 | +For more details on how to write YARD doc comments, refer to YARD’s official [Getting Started guide](https://rubydoc.info/gems/yard/file/docs/GettingStarted.md). |
| 43 | + |
11 | 44 | ### Contributor license agreement |
12 | 45 |
|
13 | 46 | When you are sending a pull request and it's a non-trivial change beyond fixing typos, please make sure to sign |
14 | 47 | [the ICLA (individual contributor license agreement)](https://cla-assistant.io/line/line-bot-sdk-ruby). Please |
15 | | -[contact us](mailto:dl_oss_dev@linecorp.com) if you need the CCLA (corporate contributor license agreement). |
| 48 | +[contact us](mailto:dl_oss_dev@linecorp.com) if you need the CCLA (corporate contributor license agreement). |
0 commit comments