Contributions to the CSync Server should use the good Scala coding style. The project is set up so that developers can use ScalaStyle to check for common violations of proper Scala coding style. ScalaStyle is set up to automatically run when the tests are run.
All code changes should include comments describing the design, assumptions, dependencies, and non-obvious aspects of the implementation. Hopefully the existing code provides a good example of appropriate code comments. If necessary, make the appropriate updates in the README.md and other documentation files.
- If one does not exist already, open an issue that your contribution is going to resolve or fix.
- Make sure to give the issue a clear title and a very focused description.
- On the issue page, set the appropriate Pipeline, Label(s), Milestone, and assign the issue to
yourself.
- We use Zenhub to organize our issues and plan our releases. Giving as much information as to what your changes are help us organize PRs and streamline the committing process.
- Make a branch from the master branch using the following naming convention:
YOUR_INITIALS/ISSUE#-DESCRIPTIVE-NAME
- For example,
kb/94-create-contributingmd
was the branch that had the commit containing this tutorial.
- Commit your changes!
- When you have completed making all your changes, create a Pull Request (PR) from your git manager or our Github repo from your branch to master.
- Fill in the template for the PR.
- Contributions require sign-off. We require that any contributers agree to the Developer's Certificate of Origin 1.1 (DCO), otherwise your pull request will be rejected.
- When committing using the command line you can sign off using the --signoff or -s flag. This adds a Signed-off-by line by the committer at the end of the commit log message.
git commit -s -m "Commit message"
- When committing using the command line you can sign off using the --signoff or -s flag. This adds a Signed-off-by line by the committer at the end of the commit log message.
- That's it, thanks for the contribution!
You have probably got most of these set up already, but starting from scratch you will need the following:
- SBT
- PostgreSQL
- RabbitMQ
-
First, install SBT using
brew install sbt
-
Install RabbitMQ using
brew install rabbitmq
-
Install PostGresql using
brew install postgres
-
Start up RabbitMQ by running
brew services start rabbitmq
-
Start up PostgreSQL by running
brew services start postgres
-
Run
createdb
to create the PostgreSQL database for csync to use -
You can stop RabbitMQ or PostgreSQL at any time by running
brew services stop (rabbitmq or postgres)
From the command line, run sbt test
to run the tests and ScalaStyle checks
To generate code coverage, run sbt clean coverage test
To generate a human readable report, run sbt coverageReport
. This will appear in the core/target/{scalaversion}/scoverage-report
folder.
Name | Version | Author | License | Release Date | Verification Code | URL |
---|---|---|---|---|---|---|
vert.x framework - vertx-core_3.4.1 - vertx-codegen_3.4.0 |
3.4.0 | Apache 2.0 | n/a | io.vertx | ||
scala-logging | 3.4.0 | Apache 2.0 | n/a | n/a | com.typesafe.scala-logging:scala-logging | |
amqp-client | 3.6.2 | Pivotal | Apache 2.0 | n/a | n/a | com.rabbitmq:amqp-client |
postgresql | 9.4-1208-jdbc41 | PostgreSQL License | n/a | n/a | org.postgresql:postgresql | |
google-api-client | 1.22.0 | Apache 2.0 | n/a | n/a | com.google.api-client:google-api-client | |
HikariCP | 2.4.6 | Brett Wooldridge | Apache 2.0 | n/a | n/a | com.zaxxer:HikariCP |
scalaj-http | 2.3.0 | Jon Hoffman | Apache 2.0 | n/a | n/a | org.scalaj:scalaj-http |
slf4j-api | 1.7.21 | MIT License | n/a | n/a | org.slf4j:slf4j-api | |
slf4j-simple | 1.7.21 | MIT License | n/a | n/a | org.slf4j:slf4j-simple | |
boopickle | 1.2.5 | Otto Chrons | MIT License | n/a | n/a |