Current project supports the Scala code of conduct and wants all of its channels (GitHub, etc.) to be inclusive environments.
You will need the following tools:
- Create your own fork of the repository
and work in a local branch based on
main
- Write code
- Write tests
- Run
sbt format
(orsbt fix
andsbt fmt
sequentially) before creating the pull request - Submit a pull request
We use scalafix to apply some rules that are configured in .scalafix.conf
.
Make sure to run sbt fix
to apply those rules.
We use scalafmt to format the source code according to the rules
described in .scalafmt.conf
, and recommend you to setup your editor to “format on save”,
as documented here.
Make sure to run sbt fmt
to ensure code formatting.
We use remark-lint to format the markdown according to the rules described in .remarkrc
.
If you have made any changes to one of the markdown files, run the formatting as follows:
- Install remark-cli:
npm install -g remark-cli
- Install remark-preset-lint-recommended:
npm install remark-preset-lint-recommended
- Run formatting:
remark . -o
Project uses testing library ScalaTest, and organizes tests according to the following guidelines:
- An assertion in regular tests should be written with
assert
and===
.
- Pull requests should be submitted from a separate branch (e.g. using
git checkout -b "username/fix-123"
). - In general we discourage force pushing to an active pull-request branch that other people are
commenting on or contributing to, and suggest using
git merge master
during development. Once development is complete, usegit rebase master
and force push to clean up the history. - The first line of a commit message should be no more than 72 characters long (to accommodate formatting in various environments).
- Commit messages should general use the present tense, normal sentence capitalization, and no final punctuation.
- If a pull request decreases code coverage more than by 5%, please file an issue to make sure that tests get added.
Push a Git tag into main
branch:
$ git tag v0.0.1
$ git push origin v0.0.1
If release build fails, delete the tag from main
branch
$ git tag -d v0.0.1
$ git push origin :refs/tags/v0.0.1
then make the corrections and try again.