diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 9ec75bd..be01474 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..d6b2d12 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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