= Keep Contribution Guide

👍🎉 First off, thanks for taking the time to contribute! 🎉👍 Contributions
are welcome from anyone on the internet, and even the smallest of fixes
are appreciated!

The following is a set of guidelines for contributing to Keep and its
packages. These are mostly guidelines, not rules. Use your best
judgment, and feel free to propose changes to this document in a pull
request.

== Getting started

1. Fork https://github.com/keep-network/keep-core[`keep-network/keep-core`]
2. Clone your fork
3. Follow the
   https://github.com/keep-network/keep-core/tree/master/docs/development[installation
   & build steps] in the repository's developer README.
4. Setup the recommended <<Development Tooling>>.
5. Open a PR against the `master` branch and describe the change you
   are intending to undertake in the PR description.

Before marking the PR as ready for review, make sure:

* It passes the linter checks (`npm run lint`) (see <<Pre-commit>> to make this
  automatic).
* It passes the
  https://app.circleci.com/github/keep-network/keep-core/pipelines[continuous
  integration tests] on CircleCI.
* Your changes have sufficient test coverage (e.g regression tests have
  been added for bug fixes, unit tests for new features)

== Development Tooling

Commits
https://help.github.com/en/articles/about-commit-signature-verification[must
be signed].

=== Continuous Integration

Keep uses https://circleci.com[CircleCI] for continuous integration. All
CircleCI jobs (including tests, linting) must be green to merge a PR.

=== Pre-commit

Pre-commit is a tool to install hooks that check code before commits are
made. It can be helpful to install this, to automatically run linter
checks and avoid pushing code that will not be accepted. Follow the
https://pre-commit.com/[installation instructions here], and then run
`pre-commit install` to install the hooks. Note that the `scripts/macos-setup.sh`
script should automatically set this up for you.

=== Linting

Linters and formatters for Solidity, JavaScript, and Go code are set up and
run automatically as part of pre-commit hooks. These are checked again in CI
builds to ensure they have been run and are passing.

If you want to change a rule, or add a custom rule, to the JavaScript or
Solidity linting, please propose these changes to our
https://github.com/keep-network/solium-config-keep[solium-config-keep] and
https://github.com/keep-network/eslint-config-keep[eslint-config-keep]
packages. All other packages have it as a dependency.
