From 0729b4119b40373fb1641d0437d9582b1a683d55 Mon Sep 17 00:00:00 2001 From: vancanhuit Date: Mon, 20 Jun 2022 19:20:21 +0700 Subject: [PATCH] Add pre-commit hooks --- .pre-commit-config.yaml | 14 ++++++++++++++ README.md | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..3256f22 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files +- repo: https://github.com/golangci/golangci-lint + rev: v1.46.2 + hooks: + - id: golangci-lint diff --git a/README.md b/README.md index eae5fae..1174cbd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ # golang-template-repository +[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) + Kickstarter repository for a golang service Dockerhub: docker push golangbuddy/test-project:tagname @@ -10,5 +12,3 @@ TODO: 3. Add secret-scanning. 4. Add makefile. 5. Add containerization. - -