Skip to content

Commit

Permalink
Update contribution docs (#309)
Browse files Browse the repository at this point in the history
Update contribution docs
  • Loading branch information
twpayne committed May 18, 2019
2 parents b006026 + e34b215 commit de73d1b
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*coverage.out
/chezmoi
/dist
/goreleaser/goreleaser.host.yaml
/goreleaser/snap.login
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ env:

install:
- go mod download
- GO111MODULE=off go get golang.org/x/tools/cmd/cover
- GO111MODULE=off go get github.com/golangci/golangci-lint/cmd/golangci-lint
- GO111MODULE=off go get github.com/mattn/goveralls
- GO111MODULE=off go get github.com/wadey/gocovmerge
- GO111MODULE=off go get mvdan.cc/gofumpt
- GO111MODULE=off go get mvdan.cc/gofumpt/gofumports
- make install-tools

script:
- make all
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ goreleaser/goreleaser.host.yaml: goreleaser/goreleaser.yaml.tmpl internal/genera
html-coverage:
go tool cover -html=coverage.out

.PHONY: install-tools
install-tools:
GO111MODULE=off go get -u \
golang.org/x/tools/cmd/cover \
github.com/golangci/golangci-lint/cmd/golangci-lint \
github.com/mattn/goveralls \
github.com/wadey/gocovmerge \
mvdan.cc/gofumpt \
mvdan.cc/gofumpt/gofumports

.PHONY: lint
lint:
go vet ./...
Expand Down
55 changes: 51 additions & 4 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,60 @@
# Contributing

chezmoi development happens on Github. When contributing, please first [open an
* [Getting started](#getting-started)
* [Developing locally](#developing-locally)
* [Contributing changes](#contributing-changes)
* [Managing releases](#managing-releases)
* [Packaging](#packaging)

## Getting started

chezmoi is written in [Go](https://golang.org) and development happens on
[GitHub](https://github.com). The rest of this document assumes that you've
checked out chezmoi locally.

## Developing locally

chezmoi is a standard Go project, using standard Go tooling, with a few extra
tools. Install these extra tools with:

make install-tools

Build chezmoi:

go build github.com/twpayne/chezmoi

Run all tests:

go test github.com/twpayne/chezmoi/...

Run chezmoi:

go run github.com/twpayne/chezmoi

## Contributing changes

Bug reports, bug fixes, and documentation improvements are always welcome.
Please [open an issue](https://github.com/twpayne/chezmoi/issues/new) or [create
a pull request](https://help.github.com/en/articles/creating-a-pull-request)
with your report, fix, or improvement.

If you want to make a more significant change, please first [open an
issue](https://github.com/twpayne/chezmoi/issues/new) to discuss the change that
you want to make. Bug reports and documentation improvements are particularly
welcome.
you want to make. Dave Cheney gives a [good
rationale](https://dave.cheney.net/2019/02/18/talk-then-code) as to why this is
important.

All changes are made via pull requests. In your pull request, please make sure
that:

* Your code is correctly formatted, according to
[gofumports](https://mvdan.cc/gofumpt/gofumports). You can ensure this by
running `make format`.

* Your code passes [`go vet`](https://golang.org/cmd/vet/) and
[`golangci-lint`](https://github.com/golangci/golangci-lint). You can ensure
this by running `make lint`.

* The commit messages match chezmoi's convention, specifically that they being
with a capitalized verb in the imperative and give a short description of what
the commit does. Detailed information or justification can be optionally
Expand All @@ -21,7 +68,7 @@ that:

* The branch applies cleanly to `master`.

## Release management
## Managing releases

Releases are managed with [goreleaser](https://goreleaser.com/).

Expand Down

0 comments on commit de73d1b

Please sign in to comment.