Skip to content

Latest commit

 

History

History
110 lines (71 loc) · 3.58 KB

CONTRIBUTING.md

File metadata and controls

110 lines (71 loc) · 3.58 KB

Contributing

Code of Conduct

Current project supports the Scala code of conduct and wants all of its channels (GitHub, etc.) to be inclusive environments.

Requirements

You will need the following tools:

Workflow

  1. Create your own fork of the repository and work in a local branch based on main
  2. Write code
  3. Write tests
  4. Run sbt format (or sbt fix and sbt fmt sequentially) before creating the pull request
  5. Submit a pull request

Formatting

Scalafix

We use scalafix to apply some rules that are configured in .scalafix.conf. Make sure to run sbt fix to apply those rules.

Scalafmt

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.

RemarkLint

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:

  1. Install remark-cli: npm install -g remark-cli
  2. Install remark-preset-lint-recommended: npm install remark-preset-lint-recommended
  3. Run formatting: remark . -o

Write tests

Project uses testing library ScalaTest, and organizes tests according to the following guidelines:

  • An assertion in regular tests should be written with assert and ===.

Submit a pull request

  • 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, use git 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.

Publish a Release (note for maintainers)

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.