github.com/ladydascalie/elvish@v0.0.0-20170703214355-2964dd3ece7f/CONTRIBUTING.md (about) 1 # Notes for Contributors 2 3 ## Testing 4 5 Always run unit tests before committing. `make` will take care of this. 6 7 ## Generated files 8 9 Some files are generated from other files. They should be commmited into the repository for this package to be go-getable. Run `go generate ./...` to regenerate them in case you modified the source. 10 11 ## Formatting the Code 12 13 Always format the code with `goimports` before committing. Run `go get golang.org/x/tools/cmd/goimports` to install `goimports`, and `goimports -w .` to format all golang sources. 14 15 To automate this you can set up a `goimports` filter for Git by putting this in `~/.gitconfig`: 16 17 [filter "goimports"] 18 clean = goimports 19 smudge = cat 20 21 Git will then always run `goimports` for you before comitting, since `.gitattributes` in this repository refers to this filter. More about Git attributes and filters [here](https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html). 22 23 ## Licensing 24 25 By contributing, you agree to license your code under the same license as existing source code of elvish. See the LICENSE file.