1
1
# pre-commit-golang
2
2
3
- Golang pre-commit hooks for http://pre-commit.com/
3
+ Golang pre-commit hooks for [ pre-commit.com ] ( http://pre-commit.com/ )
4
4
5
- ## install
5
+ ## Installation
6
6
7
- you need first to install [ pre-commit] ( https://pre-commit.com/#install )
7
+ You first need to install [ pre-commit] ( https://pre-commit.com/#install ) :
8
8
9
- ```
9
+ ``` bash
10
10
brew install pre-commit
11
11
```
12
12
13
- install pre-commit into your git repo
13
+ Then install pre-commit in your Git repository:
14
14
15
- ```
15
+ ``` bash
16
16
pre-commit install
17
17
```
18
18
19
19
## Usage
20
20
21
- Add a file named ` .pre-commit-config.yaml ` into the root directory of your repository
21
+ Add a file named ` .pre-commit-config.yaml ` to the root directory of your repository:
22
22
23
23
``` yaml
24
24
repos :
25
25
- repo : https://github.com/Bahjat/pre-commit-golang
26
- rev : v1.0.2
26
+ rev : v1.0.5
27
27
hooks :
28
28
- id : go-fmt-import
29
29
- id : go-vet
@@ -35,21 +35,22 @@ repos:
35
35
- id : golangci-lint # requires github.com/golangci/golangci-lint
36
36
args : [--config=.github/linters/.golangci.yml] # optional
37
37
- id : go-ruleguard # requires https://github.com/quasilyte/go-ruleguard
38
- args : [rules/rules.go] # required
38
+ args : [rules/rules.go]
39
+ - id : go-imports-reviser # requires https://github.com/incu6us/goimports-reviser
39
40
` ` `
40
41
41
42
## Contributing
42
43
43
44
- Fork it
44
- - Create your feature branch ` git checkout -b my-new-feature`
45
- - Commit your changes `git commit -am 'Add some feature'`
46
- - Push to the branch `git push origin my-new-feature`
47
- - Create new Pull Request
45
+ - Create your feature branch: ` git checkout -b my-new-feature`
46
+ - Commit your changes : ` git commit -am 'Add some feature'`
47
+ - Push to the branch : ` git push origin my-new-feature`
48
+ - Create a new Pull Request
48
49
49
50
# # Credits
50
51
51
- This repo is inspired by [dnephin/pre-commit-golang](https://github.com/dnephin/pre-commit-golang)
52
+ This repository is inspired by [dnephin/pre-commit-golang](https://github.com/dnephin/pre-commit-golang).
52
53
53
54
# # Finally
54
55
55
- If you like this hooks please give a star
56
+ If you like these hooks, please give this repository a star!
0 commit comments