35 lines
1.2 KiB
Markdown
35 lines
1.2 KiB
Markdown
# Contributing
|
|
|
|
## Code.
|
|
- Two spaces indentation.
|
|
- CamelCase for classes.
|
|
- camelCase for methods.
|
|
- snake_case for variables and class properties.
|
|
- Max line length at 80 chars.
|
|
- Classes can be no longer than 100 LOC.
|
|
- Methods can be no longer than 5 LOC.
|
|
- Pass no more than 4 parameters/hash keys into a method.
|
|
- Composition over Inheritance.
|
|
- Comments are a code smell.
|
|
- Routes can instantiate only one object.
|
|
- Require other classes with 'use' at the beginning of the class file.
|
|
- Do not specify 'public' if method is public, it's implicit.
|
|
- Always use guard clauses.
|
|
|
|
## Git flow.
|
|
- Do not commit to master.
|
|
- Open a short-living feature branch.
|
|
- Open a pull request.
|
|
- Add close #issue in pull request description.
|
|
- Work on the pull request.
|
|
- Wait for confirmation before merging to master.
|
|
- No one will accept a pull request that doesn't have 100% test coverage.
|
|
- Commit title no more than 80 chars, empty line after.
|
|
- Commit description as long as you want, 80 chars wrap.
|
|
- Keep the GitHub open issues count at less than 10.
|
|
|
|
## Issues creation.
|
|
- Discuss issues on public Slack chats, discuss code in pull requests.
|
|
- Organize features on Trello.
|
|
- Open a small github issue only when it has been discussed.
|