In this page we present some standards that we've adopted through the development and that we expect to see on contributions.
If you find yourself in a situation not covered by this page, have a look at http://guidelines.plataformatec.com.br/ and open a issue with your question. You can use similar code snippets from the project as base.
If you find bunches of the code that are out of the standards defined here, feel free to fix it or open an issue letting us know about it. Thank you!
The indentation should always use two blank spaces.
Decision structures should use && and || instead of and and or;
When calling a method or function, always use it's parenthesis;
Don't leave blank lines when you're finishing a block between the code and the end statement.
We use rubocop as our code linter. The rules we defined can be seen here. If your code is not compliant to the rules we defined for rubocop, CI will fail and your code will not be accepted. To avoid those inconveniences, run rake rubocop and fix the offenses (if there are any) before opening a merge request.
Some offenses are easy enough to correct and rubocop can correct them for you. For that, run rubocop -a.
Finally, we are always trying to improve. So if you don't agree with some rule or has a suggestion to create another one, please open a new issue with the label question so we can discuss it.