add linter and pre-commit

This commit is contained in:
Gabriel Augendre 2024-03-27 22:01:18 +01:00
parent 3aa8e86695
commit 31dcab6d70
3 changed files with 17 additions and 0 deletions

3
.golangci.yml Normal file
View file

@ -0,0 +1,3 @@
issues:
exclude-dirs:
- contrib

11
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/golangci/golangci-lint
rev: v1.57.1
hooks:
- id: golangci-lint-full

3
Makefile Normal file
View file

@ -0,0 +1,3 @@
.PHONY: lint
lint:
pre-commit run --all-files golangci-lint-full