diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..89ba902 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +tab_width = 4 + +[*.go] +indent_style = tab + +[*.{yaml,yml}] +indent_size = 2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..aa84ec9 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,26 @@ +# 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 + +ci: + autofix_commit_msg: | + [pre-commit.ci] auto fixes from pre-commit.com hooks + + for more information, see https://pre-commit.ci + autofix_prs: true + autoupdate_branch: '' + autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' + autoupdate_schedule: weekly + skip: [] + submodules: false 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. - -