1
0
Mirror von https://github.com/astaxie/beego.git synchronisiert 2025-09-14 00:52:08 +00:00

Merge pull request #4168 from flycash/ftr/layout

Add git hooks
Dieser Commit ist enthalten in:
Ming Deng
2020-08-18 21:08:56 +08:00
committet von GitHub
Commit 63599c0032
4 geänderte Dateien mit 23 neuen und 0 gelöschten Zeilen

Datei anzeigen

@@ -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,
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
### Pull requests

7
githook/pre-commit Ausführbare Datei
Datei anzeigen

@@ -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