Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 1.61 KB

CODING_STANDARDS.md

File metadata and controls

42 lines (33 loc) · 1.61 KB

Contributing to ErlyORM

If you would like to contribute to ErlyORM or the related projects including aleppo, tiny_pq, drivers and so on, then we welcome your contributions. However in order to keep our code quality as high as we can we ask that everyone read this guide before sending pull requests. (And if you don't get it perfect we won't bite your head off)

Simple Pull Requests and named branches

Please keep your pull requests simple, if you want to make changes to the mongo db driver and add a driver for couch db do the first on a mongo branch and the second on a couch branch, and then send 2 pull requests.

Make it pass Dialyzer

I run dialyzer on everything, if it breaks it probably means that we have more work to do, so try to make it pass.

Tests are required

We have been adding tests with proper to boss_db and they will show up in boss sooner or later. While historically most of the code does not have any sort of tests we need to start adding it. Unit tests are good, property based tests are better.

No deeply nested code

If your code has more than 1 level of nested case, fun or foldl, It needs to be re factored. Really keep the functions short.

Documentation is required

Please use EDoc (http://www.erlang.org/doc/apps/edoc/chapter.html) compatible comments for your functions and modules. In-code comments are welcome too.

Coding style

Last, but not least.

  • Please use EditorConfig to ensure consistent line-endings, tabs/spaces, etc. or make sure, that your editor does satisfy the coding styles defined within .editorconfig file shipped with a project