mirror of
https://github.com/astaxie/beego.git
synced 2024-11-24 17:00:55 +00:00
commit
63599c0032
@ -7,6 +7,22 @@ It is the work of hundreds of contributors. We appreciate your help!
|
|||||||
Here are instructions to get you started. They are probably not perfect,
|
Here are instructions to get you started. They are probably not perfect,
|
||||||
please let us know if anything feels wrong or incomplete.
|
please let us know if anything feels wrong or incomplete.
|
||||||
|
|
||||||
|
## Prepare environment
|
||||||
|
|
||||||
|
Firstly, install some tools. Execute those commands **outside** the project. Or those command will modify go.mod file.
|
||||||
|
|
||||||
|
```shell script
|
||||||
|
go get -u golang.org/x/tools/cmd/goimports
|
||||||
|
|
||||||
|
go get -u github.com/gordonklaus/ineffassign
|
||||||
|
```
|
||||||
|
|
||||||
|
And the go into project directory, run :
|
||||||
|
```shell script
|
||||||
|
cp ./githook/pre-commit ./.git/hooks/pre-commit
|
||||||
|
```
|
||||||
|
This will add git hooks into .git/hooks. Or you can add it manually.
|
||||||
|
|
||||||
## Contribution guidelines
|
## Contribution guidelines
|
||||||
|
|
||||||
### Pull requests
|
### Pull requests
|
||||||
|
7
githook/pre-commit
Executable file
7
githook/pre-commit
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
goimports -l pkg
|
||||||
|
goimports -l examples
|
||||||
|
|
||||||
|
ineffassign .
|
||||||
|
|
||||||
|
staticcheck -show-ignored -checks "-ST1017,-U1000,-ST1005,-S1034,-S1012,-SA4006,-SA6005,-SA1019,-SA1024" ./pkg
|
Loading…
Reference in New Issue
Block a user