mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-04 10:57:50 +08:00
Move the "contributing" section to a shiny CONTRIBUTING.md file
This commit is contained in:
parent
e6a9e79ea0
commit
4ca7fbca03
25
CONTRIBUTING.md
Normal file
25
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Notes for Contributors
|
||||
|
||||
## Testing
|
||||
|
||||
Always run unit tests before committing. `make` will take care of this.
|
||||
|
||||
## Generated files
|
||||
|
||||
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.
|
||||
|
||||
## Formatting the Code
|
||||
|
||||
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.
|
||||
|
||||
To automate this you can set up a `goimports` filter for Git by putting this in `~/.gitconfig`:
|
||||
|
||||
[filter "goimports"]
|
||||
clean = goimports
|
||||
smudge = cat
|
||||
|
||||
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).
|
||||
|
||||
## Licensing
|
||||
|
||||
By contributing, you agree to license your code under the same license as existing source code of elvish. See the LICENSE file.
|
27
README.md
27
README.md
|
@ -135,33 +135,6 @@ go get -u github.com/elves/elvish
|
|||
|
||||
Remember to put the two `export`s above into your `bashrc` or `zshrc` (or whatever).
|
||||
|
||||
## Notes for Contributors
|
||||
|
||||
### Testing
|
||||
|
||||
Always run unit tests before committing. `make` will take care of this.
|
||||
|
||||
### Generated files
|
||||
|
||||
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.
|
||||
|
||||
### Formatting the Code
|
||||
|
||||
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.
|
||||
|
||||
To automate this you can set up a `goimports` filter for Git by putting this in `~/.gitconfig`:
|
||||
|
||||
[filter "goimports"]
|
||||
clean = goimports
|
||||
smudge = cat
|
||||
|
||||
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).
|
||||
|
||||
### Licensing
|
||||
|
||||
By contributing, you agree to license your code under the same license as existing source code of elvish. See the LICENSE file.
|
||||
|
||||
|
||||
## Name
|
||||
|
||||
In [roguelikes](https://en.wikipedia.org/wiki/Roguelike), items made by the elves have a reputation of high quality. These are usually called **elven** items, but I chose **elvish** for an obvious reason.
|
||||
|
|
Loading…
Reference in New Issue
Block a user