2019-06-09 10:20:59 +00:00
# Contributing code to famedly talk
2019-06-10 12:19:40 +00:00
Everyone is welcome to contribute code to FamedlySDK, provided that they are willing to license their contributions under the same license as the project itself.
2019-06-09 10:20:59 +00:00
Please follow these rules when contributing code to famedly talk:
## Merge Requests:
- Never ever just push something directly to the master branch!
- Create a new branch or fork this project and send a Merge Request.
- Only Merge Requests with a working CI can be merged.
- Only Merge Requests with at least one code reviewer can be merged.
- Merge Requests may be refused if they don't follow the rules below.
2019-07-20 08:30:58 +00:00
- A new Merge Request SHOULD never decrease the test coverage.
## Branches
### Naming
Branches should get named by this pattern: `[Module Name]-[Type]-[Detail]` .
That means for example: "users-fix-attach-roles-issue#765".
Modules are various parts of the App. This can for example be the directory list or the chat room.
Types can be one of these:
- **feature**
- **enhance**
- **cleanup**
- **refactor**
- **fix**
- **hotfix** (should rarely get used)
The Detail part of the pattern should be a short description of what the branch delivers.
## Commit Messages
Commit Messages should get written in this pattern: `[[Module Name]] [Commit Message]` .
That means for example: "[users] add fetch users endpoint".
2019-06-09 10:20:59 +00:00
## File structure:
- Every file must be named by the class and must be capitalized in the beginning.
- Directories need to be lowercase.
## Code style:
2020-05-22 10:12:18 +00:00
Please use code formatting. You can use VSCode or Android Studio. On other editors you need to run:
```
flutter format lib/**/*/*.dart
```
2019-06-09 10:20:59 +00:00
## Code quality:
- Don't repeat yourself! Use local variables, functions, classes.
2019-07-20 08:30:58 +00:00
- Don't mix UI and business logic in the same environment.
2019-06-09 10:20:59 +00:00
- Write tests for new classes, functions and widgets.
- Keep it simple stupid: https://en.wikipedia.org/wiki/KISS_principle
- Describe all of your classes, methods and attributes using **dartdoc** comments. Read this for more informations: https://dart.dev/guides/language/effective-dart/documentation