🔧 Added editor and pre-commit configs

This commit is contained in:
Maxim Lebedev 2019-07-24 13:38:36 +05:00
parent 4f38512860
commit 9e9603c220
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F
2 changed files with 30 additions and 0 deletions

16
.editorconfig Normal file
View File

@ -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

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

@ -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