🔧 Added editor and pre-commit configs
This commit is contained in:
parent
4f38512860
commit
9e9603c220
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue