From a1b9ffd5ba6597ce5671057981caddebc4d2ab2b Mon Sep 17 00:00:00 2001 From: Tom M Date: Sat, 28 Oct 2017 22:15:46 +0200 Subject: [PATCH 1/5] Create CONTRIBUTING.md --- CONTRIBUTING.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..57c0bd58 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributing + +Thanks for considering to contribute to FluidSynth. Before implementing +any huge new feature, consider bringing up your ideas on our mailing list: +https://lists.nongnu.org/mailman/listinfo/fluid-dev + +Contributing can be done by submitting pull requests on Github: +https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/ + +Or by submitting patches to the mailing list. Patches should be created with + +``` +git format-patch +``` + +So in every case you should be familiar with the basics of git. + +We'll try comment on our changes within three business days +(and typically, one business day). We may suggest +changes, improvements or alternatives. + +Some things that will increase the chance that your pull request or patch is accepted: + +* Unless reporting bugs, give a reasoning / motivation for any changes or proposals you make. +* Follow our style guide. +* Keep your commits "atomic". +* Write a meaningful commit messages. From d49421f023aba6e8caaf07a25e7ed9e760b7511f Mon Sep 17 00:00:00 2001 From: Tom M Date: Sat, 28 Oct 2017 22:36:04 +0200 Subject: [PATCH 2/5] add style guide to contribution.md addressing #250 --- CONTRIBUTING.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 57c0bd58..c31252e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,3 +25,24 @@ Some things that will increase the chance that your pull request or patch is acc * Follow our style guide. * Keep your commits "atomic". * Write a meaningful commit messages. + +## Style Guide + +Find FluidSynth's style guide below. Most of the syntax issues can be automatically applied with `clang-format` and `clang-tidy` using the config files in the repository root. + +#### General +* Every function should have a short comment explaining it's purpose +* Every public API function **must** be documented with purpose, params and return value +* Prefer `int` to `unsigned int` +* Use spaces rather than tabs +* Avoid macros + +#### Naming Conventions +* Words separated by underscores +* Macros always UPPER_CASE +* Function and Variable names always lower_case, (e.g. `fluid_componentname_purpose()`) + +#### Bracing +* Every block after an if, else, while or for should be enclosed in braces +* **Allman-Style** braces everywhere + From 6957f063dcf2a5cdd9b9ce259c8cd25dbae455e8 Mon Sep 17 00:00:00 2001 From: Tom M Date: Sat, 28 Oct 2017 22:48:42 +0200 Subject: [PATCH 3/5] Update CONTRIBUTING.md --- CONTRIBUTING.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c31252e3..bc4a5905 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,16 +4,12 @@ Thanks for considering to contribute to FluidSynth. Before implementing any huge new feature, consider bringing up your ideas on our mailing list: https://lists.nongnu.org/mailman/listinfo/fluid-dev -Contributing can be done by submitting pull requests on Github: +Contributing can be done by +* submitting pull requests on Github: https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/ +* submitting patches to the mailing list. -Or by submitting patches to the mailing list. Patches should be created with - -``` -git format-patch -``` - -So in every case you should be familiar with the basics of git. +Patches should be created with `git format-patch`, so in every case you should be familiar with the basics of git. We'll try comment on our changes within three business days (and typically, one business day). We may suggest @@ -21,7 +17,7 @@ changes, improvements or alternatives. Some things that will increase the chance that your pull request or patch is accepted: -* Unless reporting bugs, give a reasoning / motivation for any changes or proposals you make. +* Except for bug fixing, give a reasoning / motivation for any changes or proposals you make. * Follow our style guide. * Keep your commits "atomic". * Write a meaningful commit messages. From 6e1d4bed401d55360492bac12f7fcbf377ff6914 Mon Sep 17 00:00:00 2001 From: Tom M Date: Sat, 28 Oct 2017 22:58:53 +0200 Subject: [PATCH 4/5] styleguide: clarify integer usage --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bc4a5905..90227979 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,7 @@ Find FluidSynth's style guide below. Most of the syntax issues can be automatica #### General * Every function should have a short comment explaining it's purpose * Every public API function **must** be documented with purpose, params and return value -* Prefer `int` to `unsigned int` +* Prefer signed integer types to unsigned ones * Use spaces rather than tabs * Avoid macros From 17cf79c5551f3dc7261c37a9d651af01f814ba7f Mon Sep 17 00:00:00 2001 From: Tom M Date: Sun, 29 Oct 2017 10:41:11 +0100 Subject: [PATCH 5/5] polish contrib guidelines --- CONTRIBUTING.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90227979..3381e19e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,13 +11,9 @@ https://help.github.com/articles/proposing-changes-to-your-work-with-pull-reques Patches should be created with `git format-patch`, so in every case you should be familiar with the basics of git. -We'll try comment on our changes within three business days -(and typically, one business day). We may suggest -changes, improvements or alternatives. - Some things that will increase the chance that your pull request or patch is accepted: -* Except for bug fixing, give a reasoning / motivation for any changes or proposals you make. +* Give a reasoning / motivation for any changes or proposals you make. * Follow our style guide. * Keep your commits "atomic". * Write a meaningful commit messages.