From 9e9603c2206e4f59263aed0d9c4ec801b398d820 Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Wed, 24 Jul 2019 13:38:36 +0500 Subject: [PATCH] :wrench: Added editor and pre-commit configs --- .editorconfig | 16 ++++++++++++++++ .pre-commit-config.yaml | 14 ++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .editorconfig create mode 100644 .pre-commit-config.yaml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..6b84d14 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# https://EditorConfig.org +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = false +trim_trailing_whitespace = true + +[*.go] +indent_style = tab +indent_size = 8 + +[*.{html,js,css,yaml,yml,md}] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..50d0c88 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +default_stages: [commit, push] +fail_fast: true +minimum_pre_commit_version: '1' +repos: +- repo: https://github.com/syntaqx/git-hooks + rev: v0.0.16 + hooks: + - id: go-mod-tidy + - id: go-fmt + - id: go-test +- repo: https://github.com/golangci/golangci-lint + rev: v1.17.1 + hooks: + - id: golangci-lint \ No newline at end of file