11# pre-commit-golang
22
3- Golang pre-commit hooks for http://pre-commit.com/
3+ Golang pre-commit hooks for [ pre-commit.com ] ( http://pre-commit.com/ )
44
5- ## install
5+ ## Installation
66
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 ) :
88
9- ```
9+ ``` bash
1010brew install pre-commit
1111```
1212
13- install pre-commit into your git repo
13+ Then install pre-commit in your Git repository:
1414
15- ```
15+ ``` bash
1616pre-commit install
1717```
1818
1919## Usage
2020
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:
2222
2323``` yaml
2424repos :
2525 - repo : https://github.com/Bahjat/pre-commit-golang
26- rev : v1.0.2
26+ rev : v1.0.5
2727 hooks :
2828 - id : go-fmt-import
2929 - id : go-vet
@@ -35,21 +35,22 @@ repos:
3535 - id : golangci-lint # requires github.com/golangci/golangci-lint
3636 args : [--config=.github/linters/.golangci.yml] # optional
3737 - 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
3940` ` `
4041
4142## Contributing
4243
4344- 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
4849
4950# # Credits
5051
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).
5253
5354# # Finally
5455
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