Add pre-commit

This commit is contained in:
IamTheFij 2024-10-18 09:10:46 -07:00
parent 87861a7324
commit 9d35e65c07
3 changed files with 52 additions and 1 deletions

36
.golangci.yml Normal file
View File

@ -0,0 +1,36 @@
---
linters:
enable:
- errname
- errorlint
- exhaustive
- gofumpt
- goimports
- gomnd
- goprintffuncname
- misspell
- tagliatelle
- tenv
- testpackage
- thelper
- tparallel
- unconvert
- wrapcheck
- wsl
disable:
- gochecknoglobals
linters-settings:
gosec:
excludes:
- G204
tagliatelle:
case:
rules:
yaml: snake
issues:
exclude-rules:
- path: _test\.go
linters:
- gosec

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

@ -0,0 +1,16 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-yaml
args:
- --allow-multiple-documents
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- repo: https://github.com/golangci/golangci-lint
rev: v1.52.2
hooks:
- id: golangci-lint

View File

@ -98,4 +98,3 @@ Contributions are welcome! Please open an issue or submit a pull request on GitH
## Author ## Author
Gomodoro is developed by [iamthefij](https://github.com/iamthefij). Gomodoro is developed by [iamthefij](https://github.com/iamthefij).