add pre-commit

This commit is contained in:
Medzik 2021-09-07 20:07:51 +00:00
parent 22e7e1aa11
commit d1ad4128d9
2 changed files with 18 additions and 0 deletions

2
.gitpod.Dockerfile vendored
View File

@ -8,3 +8,5 @@ RUN sudo mv bin/* /usr/bin/ && \
RUN yarn global add nodemon
RUN echo "export PATH=\$PATH:`yarn global bin`" >> ~/.bashrc
RUN pip install pre-commit

16
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,16 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/tekwizely/pre-commit-golang
rev: master
hooks:
#
# Go Mod Tidy
#
- id: go-mod-tidy
- id: go-mod-tidy-repo
#
# Formatters
#
- id: go-fmt
- id: go-fmt-repo