[#164] pre-commit: Add pre-commit
Some checks failed
DCO action / DCO (pull_request) Successful in 1m14s
Tests and linters / Check clang-format (pull_request) Failing after 1m16s
Tests and linters / Tests (pull_request) Successful in 1m44s
Tests and linters / Tests with -race (pull_request) Successful in 2m20s
Tests and linters / Lint (pull_request) Successful in 3m4s
Some checks failed
DCO action / DCO (pull_request) Successful in 1m14s
Tests and linters / Check clang-format (pull_request) Failing after 1m16s
Tests and linters / Tests (pull_request) Successful in 1m44s
Tests and linters / Tests with -race (pull_request) Successful in 2m20s
Tests and linters / Lint (pull_request) Successful in 3m4s
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
0e1fe62500
commit
cc3e7b6c71
1 changed files with 64 additions and 0 deletions
64
.pre-commit-config.yaml
Normal file
64
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
ci:
|
||||||
|
autofix_prs: false
|
||||||
|
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.5.0
|
||||||
|
hooks:
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: check-case-conflict
|
||||||
|
- id: check-executables-have-shebangs
|
||||||
|
- id: check-shebang-scripts-are-executable
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: check-json
|
||||||
|
- id: check-xml
|
||||||
|
- id: check-yaml
|
||||||
|
- id: trailing-whitespace
|
||||||
|
args: [--markdown-linebreak-ext=md]
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
exclude: "(.key|.svg)$"
|
||||||
|
|
||||||
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||||
|
rev: v0.9.0.6
|
||||||
|
hooks:
|
||||||
|
- id: shellcheck
|
||||||
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: make-lint
|
||||||
|
name: Run Make Lint
|
||||||
|
entry: make lint
|
||||||
|
language: system
|
||||||
|
pass_filenames: false
|
||||||
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: make-lint
|
||||||
|
name: Run Make clang
|
||||||
|
entry: make clang
|
||||||
|
language: system
|
||||||
|
pass_filenames: false
|
||||||
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: go-unit-tests
|
||||||
|
name: go unit tests
|
||||||
|
entry: make test GOFLAGS=''
|
||||||
|
pass_filenames: false
|
||||||
|
types: [go]
|
||||||
|
language: system
|
||||||
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: gofumpt
|
||||||
|
name: gofumpt
|
||||||
|
entry: make fumpt
|
||||||
|
pass_filenames: false
|
||||||
|
types: [go]
|
||||||
|
language: system
|
||||||
|
|
||||||
|
- repo: https://github.com/TekWizely/pre-commit-golang
|
||||||
|
rev: v1.0.0-rc.1
|
||||||
|
hooks:
|
||||||
|
- id: go-staticcheck-repo-mod
|
||||||
|
- id: go-mod-tidy
|
Loading…
Reference in a new issue