Skip to content

Latest commit

 

History

History
72 lines (55 loc) · 2.49 KB

CONTRIBUTING.md

File metadata and controls

72 lines (55 loc) · 2.49 KB

Contributing to Handshake

Code style

This repository includes a file .eslintrc.json which sets linting preferences for the project. The continuous integration bot will install bslint which vendors a specific version of eslint and jsdoc. Before submitting a pull request, please make sure your code is clean of linting errors and has a valid documentation. If you choose to use bslint and/or jsdoc, they can be installed globally in your development environment:

npm install bslint jsdoc -g
cd hsd              # must be in repository root
npm run lint        # command is defined in package.json
npm run build-docs  # also defined in package.json

Testing

bmocha will be installed as a "developer dependency" if installed without the --omit=dev flag. The complete built-in testing suite can be run with the command:

cd hsd
npm run test

You can specify a single test file to run with (for example):

cd hsd
npm run test-file test/wallet-test.js

Before submitting a pull request, please make sure your code changes do not break any of the existing regression tests or linting rules. We currently use GitHub Workflows to run the testing suite on all new pull requests.

Recent workflow actions are available: https://github.com/handshake-org/hsd/actions

All code changes should be covered by new tests if applicable. We currently use Coveralls to examine test coverage, and a pull request that decreases test coverage will likely not be reviewed by contributors or maintainers.

Current test coverage details are available: https://coveralls.io/github/handshake-org/hsd

Commit messages

Whenever possible, commits should prefixed by the module they change. The module name is generally the folder name in the lib/ directory in which the changes occur (subdirectories can usually be ignored). Please see recent commits to master branch for examples of the preferred pattern.

Additional examples:

test: increase timeouts
pkg: update CHANGELOG
wallet: expose importname in RPC

Additional commit details are always welcome after the short title. A good example of this is in this commit. Note how the author used a very brief commit message as the title but then added a detailed description in the extended message.