|
|
|
## General
|
|
|
|
There are a few things we'd like to ask you to do, to keep the project as organized and maintainable as possible. They are as follows:
|
|
|
|
|
|
|
|
* **Keep your git history clean.**
|
|
|
|
* Please keep to the standard of writing commit messages: start with a capital letter and use the correct tense. You can imagine your commit message is a continuation of "This commit will...". Make sure each commit message clearly explains what you changed. Use commit titles to summarize the changes and the commit body to explain them in detail.
|
|
|
|
* Use `git rebase -i <BRANCH>` when rebasing on a different branch. Please avoid merging branches (unless you are making an MR to `development` or `master`) as this creates a messy commit history. If you are not familiar with rebasing, you can read the [documentation](https://git-scm.com/docs/git-rebase).
|
|
|
|
|
|
|
|
* **Create your branch from the issue overview.** Open the issue you want to be working on and select the `create branch` option. This way, the branch will be linked to the issue and once an MR from it is merged, it will automatically close it.
|
|
|
|
* **List all your significant changes in the [changelog](/eip/labrador/submit/-/blob/development/CHANGELOG.md).**
|
|
|
|
* Log changes under the `[UNRELEASED]` tag.
|
|
|
|
* Make sure to put it under the correct category (`added` / `changed` / `fixed`).
|
|
|
|
|
|
|
|
* **Make sure the code is properly formatted.** You can check you formatting by running `./gradlew spotlessCheck` and have it automatically formatted by running `./gradlew spotlessApply`.
|
|
|
|
|
|
|
|
* **Test your code.** Make sure you test all the code you write. We try to keep the test coverage as high as possible. To run the tests with gradle, you can run `./gradlew test` and to generate the reports, you can run `./gradlew jacocoTestReport` or `./gradlew jacocoTestCoverageVerification`.
|
|
|
|
|
|
|
|
* **Ensure your GitLab CI passes.** Your MR will not be able to merge if the pipelines on your MR don't pass. To check everything locally, run `./gradlew clean` followed by `./gradlew build`. Sometimes, one of the jobs in the CI doesn't pass due to a timeout - this might have been cause by a high load on the GitLab builders, so simply rerunning that job will often fix the issue.
|
|
|
|
|
|
|
|
* **Write detailed issue and MR descriptions.** There are templates created for both issues and merge requests which you can fill in to keep your description as clear and informative as possible.
|
|
|
|
|
|
## Where to put code
|
|
## Where to put code
|
|
|
|
|
|
We have the following conventions for deciding when to put code in a `Controller`/`Service`/helper method:
|
|
We have the following conventions for deciding when to put code in a `Controller`/`Service`/helper method:
|
... | | ... | |