You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is worth noting that before the checkout, you need to keep the current branch directory clean, otherwise the untracked file will be brought to the new branch, which can be viewed by `git status` .
41
41
42
+
## Install dependent tools
42
43
43
-
## Use `pre-commit` hook
44
+
`make deps` install all the dependent tools, include `pre-commit``goyacc``license-eye``staticcheck`.
45
+
46
+
### Use `pre-commit` hook
44
47
45
48
BFE developers use the [pre-commit](http://pre-commit.com/) tool to manage Git pre-commit hooks. It helps us format the source code and automatically check some basic things before committing (such as having only one EOL per file, not adding large files in Git, etc.).
46
49
47
50
The `pre-commit` test is part of the unit test in Travis-CI. A PR that does not satisfy the hook cannot be submitted to BFE. Install `pre-commit` first and then run it in current directory:
48
51
49
52
```bash
50
-
$ pip install pre-commit
51
-
$ pre-commit install
53
+
# ensure installed pre-commit
54
+
$ make deps
55
+
# enable autoupdate and install hooks
56
+
$ make precommit
52
57
```
53
58
54
59
BFE modify the format of golang source code with `gofmt` .
55
60
56
-
57
-
## Use `license-eye` tool
61
+
### Use `license-eye` tool
58
62
59
63
[license-eye](http://github.com/apache/skywalking-eyes) helps us check and fix file's license header declaration. All files' license header should be done before committing.
60
64
61
65
The `license-eye` check is part of the Github-Action. A PR that check failed cannot be submitted to BFE. Install `license-eye` and do check or fix:
62
66
63
67
```bash
64
-
$ make license-eye-install
68
+
# ensure installed license-eye
69
+
$ make deps
70
+
# check the license header
65
71
$ make license-check
72
+
# fix the license header
66
73
$ make license-fix
67
74
```
68
75
69
-
70
76
## Start development
71
77
72
78
I delete a line of README.md and create a new file in the case.
0 commit comments