summaryrefslogtreecommitdiff
path: root/doc/contributing/making_changes_to_ruby.md
blob: 260fadb7e34b96b168593e042c7ed3e55a9b3d31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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.