1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Improve documentation on contributing to Ruby

co-authored-by: Peter Zhu <peter@peterzhu.ca>
co-authored-by: Stan Lo <stan001212@gmail.com>
This commit is contained in:
Jemma Issroff 2022-05-09 11:45:50 -04:00 committed by Peter Zhu
parent becafe1efb
commit c00feffb46
Notes: git 2022-05-11 23:59:45 +09:00
13 changed files with 442 additions and 820 deletions

View file

@ -0,0 +1,36 @@
# Contributing a pull request
## Code style
Here are some general rules to follow when writing Ruby and C code for CRuby:
* Do not change code unrelated to your pull request (including style fixes)
* Indent 4 spaces for C without tabs (tabs are two levels of indentation, equivalent to 8 spaces)
* Indent 2 spaces for Ruby without tabs
* ANSI C style for function declarations
* Follow C99 Standard
* PascalStyle for class/module names
* UNDERSCORE_SEPARATED_UPPER_CASE for other constants
* Abbreviations should be all upper case
## Commit messages
Use the following style for commit messages:
* Use a succinct subject line
* Include reasoning behind the change in the commit message, focusing on why the change is being made
* Refer to issue (such as `Fixes [Bug #1234]` or `Implements [Feature #3456]`), or discussion on the mailing list (such as [ruby-core:12345])
## CI
GitHub actions will run on each pull request.
There is [a CI that runs on master](https://rubyci.org/). It has broad coverage of different systems and architectures, such as Solaris SPARC and macOS.
# Contributing to standard libraries
Everything in the [lib](https://github.com/ruby/ruby/tree/master/lib) directory is mirrored from a standalone repository into the Ruby repository.
If you'd like to make contributions to standard libraries, do so in the standalone repositories, and the
changes will be automatically mirrored into the Ruby repository.
For example, CSV lives in [a separate repository](https://github.com/ruby/csv) and is mirrored into [Ruby](https://github.com/ruby/ruby/tree/master/lib/csv).