Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #475 from bovi/contributing

More Contributing Documentation
  • Loading branch information...
commit 1afda93c7ae70d85e713a2a44e9c32dd604f1a5a 2 parents 25a98d2 + 5e16c23
@matz matz authored
Showing with 25 additions and 8 deletions.
  1. +25 −8 doc/coding_conventions.md → CONTRIBUTING.md
View
33 doc/coding_conventions.md → CONTRIBUTING.md
@@ -1,14 +1,31 @@
-# Coding conventions
+# How to contribute
+
+mruby is an open-source project which is looking forward to each contribution.
+
+## Your Pull Request
+
+To make it easy to review and understand your change please keep the following
+things in mind before submitting your pull request:
+
+* Work on the latest possible state of **mruby/master**
+* Test your changes before creating a pull request (**make test**)
+* If possible write a test case which confirms your change
+* Don't mix several features or bug-fixes in one pull request
+* Create a branch which is dedicated to your change
+* Create a meaningful commit message
+* Explain your change (i.e. with a link to the issue you are fixing)
+
+## Coding conventions
How to style your C and Ruby code which you want to submit.
-## C code
+### C code
The core part (parser, bytecode-interpreter, core-lib, etc.) of mruby is
written in the C programming language. Please note the following hints for your
C code:
-### Comply with C99 (ISO/IEC 9899:1999)
+#### Comply with C99 (ISO/IEC 9899:1999)
mruby should be highly portable to other systems and compilers. For that it is
recommended to keep your code as close as possible to the C99 standard
@@ -17,19 +34,19 @@ recommended to keep your code as close as possible to the C99 standard
Although we target C99, VC is also an important target for mruby, so that we
avoid local variable declaration in the middle.
-### Reduce library dependencies to a minimum
+#### Reduce library dependencies to a minimum
The dependencies to libraries should be put to an absolute minimum. This
increases the portability but makes it also easier to cut away parts of mruby
on-demand.
-### Don't use C++ style comments
+#### Don't use C++ style comments
/* This is the prefered comment style */
Use C++ style comments only for temporary comment e.g. commenting out some code lines.
-### Insert a break after the method return value:
+#### Insert a break after the method return value:
int
main(void)
@@ -37,12 +54,12 @@ Use C++ style comments only for temporary comment e.g. commenting out some code
...
}
-## Ruby code
+### Ruby code
Parts of the standard library of mruby is written in the Ruby programming language
itself. Please note the following hints for your Ruby code:
-### Comply with the Ruby standard (ISO/IEC 30170:2012)
+#### Comply with the Ruby standard (ISO/IEC 30170:2012)
mruby is currently targeting to execute Ruby code which complies to ISO/IEC
30170:2012 (http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579).
Please sign in to comment.
Something went wrong with that request. Please try again.