mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-11-27 23:11:20 +08:00
Use .gitattributes to filter go sources through goimports
This commit is contained in:
parent
42fcb8eb22
commit
615cbc2d0b
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.go filter=goimports
|
21
README.md
21
README.md
|
@ -42,6 +42,27 @@ go get -u github.com/xiaq/elvish
|
|||
Remember to put the two `export`s above into your `bashrc` or `zshrc` (or
|
||||
whatever).
|
||||
|
||||
## Notes for Contributors
|
||||
|
||||
The `.gitattributes` in this repo dictates that go sources be filtered through
|
||||
the `goimports` filter before checking in. If you would like to contribute,
|
||||
you are advised to set up the filter:
|
||||
|
||||
1. Install `goimports`:
|
||||
|
||||
```
|
||||
go get code.google.com/p/go.tools/cmd/goimports
|
||||
```
|
||||
|
||||
2. Put this in `~/.gitconfig`:
|
||||
|
||||
```
|
||||
[filter "goimports"]
|
||||
clean = goimports -tabwidth=4
|
||||
smudge = cat
|
||||
required
|
||||
```
|
||||
|
||||
## Name
|
||||
|
||||
In rogue-likes, items made by the elves have a reputation of high quality.
|
||||
|
|
Loading…
Reference in New Issue
Block a user