Skip to content
This repository has been archived by the owner on Jan 20, 2020. It is now read-only.

Latest commit

 

History

History
125 lines (86 loc) · 3.28 KB

CONTRIBUTING.md

File metadata and controls

125 lines (86 loc) · 3.28 KB

Contributing

Build Status codecov slack

Development

Housekeeping

Git Hooks

A pre-commit hook is available that runs some basic checks over staged changes to keep things clean and tidy. It can be installed by running:

make .scripts

Learn more about git hooks here.

Commits

Commits should include a single functional change, and the message should be prefixed with the primary component being changed. For example:

db: implement improved not-found errors
docs: update web docs with UIKit and fixed links

Relevant issues should be mentioned in the commit message body:

chore: set up eslint for web

closes #40

Branching

Branch names should be prefixed with the primary component being changed as well. For example:

git checkout -b log/resolver-middleware

Web

Development documentation for the Timelines web app can be found in ./web/README.md.

Backend

GoDoc

The backend is currently written in Golang and is made up of 2 components, a server (API) and a worker. They can both be run from the same binary, timelines, that you can build using:

make
./timelines --help

Note that you'll want Modules enabled using GO111MODULE=on or by cloning this repository outside your GOPATH. The minimum Go version is defined in go.mod.

Code Style

All Go code should satisfy gofmt and golint.

Development Environment

Install and run Docker, then use the provided Makefile:

make devenv
make devpg  # initialize postgres database

To deploy timelines components using devenv assets, use the --dev flag:

./timelines server --dev
./timelines worker --dev

Utility functions for development are available as well under the dev command:

./timelines dev --help

Generated Code

All Go code generation tasks should be able to be triggered by go generate:

go generate ./...

To generate all code in the project, including web code, run:

make generate

See gotools for more details.