diff options
Diffstat (limited to 'doc/development/contributing/style_guides.md')
-rw-r--r-- | doc/development/contributing/style_guides.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/development/contributing/style_guides.md b/doc/development/contributing/style_guides.md new file mode 100644 index 00000000000..6f1ba5d62a5 --- /dev/null +++ b/doc/development/contributing/style_guides.md @@ -0,0 +1,39 @@ +# Style guides + +1. [Ruby](https://github.com/bbatsov/ruby-style-guide). + Important sections include [Source Code Layout][rss-source] and + [Naming][rss-naming]. Use: + - multi-line method chaining style **Option A**: dot `.` on the second line + - string literal quoting style **Option A**: single quoted by default +1. [Rails](https://github.com/bbatsov/rails-style-guide) +1. [Newlines styleguide][newlines-styleguide] +1. [Testing][testing] +1. [JavaScript styleguide][js-styleguide] +1. [SCSS styleguide][scss-styleguide] +1. [Shell commands](../shell_commands.md) created by GitLab + contributors to enhance security +1. [Database Migrations](../migration_style_guide.md) +1. [Markdown](http://www.cirosantilli.com/markdown-styleguide) +1. [Documentation styleguide](../documentation/styleguide.md) +1. Interface text should be written subjectively instead of objectively. It + should be the GitLab core team addressing a person. It should be written in + present time and never use past tense (has been/was). For example instead + of _prohibited this user from being saved due to the following errors:_ the + text should be _sorry, we could not create your account because:_ +1. Code should be written in [US English][us-english] + +This is also the style used by linting tools such as +[RuboCop](https://github.com/bbatsov/rubocop) and [Hound CI](https://houndci.com). + +--- + +[Return to Contributing documentation](index.md) + +[rss-source]: https://github.com/bbatsov/ruby-style-guide/blob/master/README.md#source-code-layout +[rss-naming]: https://github.com/bbatsov/ruby-style-guide/blob/master/README.md#naming +[doc-guidelines]: ../documentation/index.md "Documentation guidelines" +[js-styleguide]: ../fe_guide/style_guide_js.md "JavaScript styleguide" +[scss-styleguide]: ../fe_guide/style_guide_scss.md "SCSS styleguide" +[newlines-styleguide]: ../newlines_styleguide.md "Newlines styleguide" +[testing]: ../testing_guide/index.md +[us-english]: https://en.wikipedia.org/wiki/American_English |