From 9d35e65c0733083aeee6bba132c4cf27f990392e Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Fri, 18 Oct 2024 09:10:46 -0700 Subject: [PATCH] Add pre-commit --- .golangci.yml | 36 ++++++++++++++++++++++++++++++++++++ .pre-commit-config.yaml | 16 ++++++++++++++++ README.md | 1 - 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .golangci.yml create mode 100644 .pre-commit-config.yaml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..286bf03 --- /dev/null +++ b/.golangci.yml @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..37ef62f --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 diff --git a/README.md b/README.md index 8b5d44c..61d8748 100644 --- a/README.md +++ b/README.md @@ -98,4 +98,3 @@ Contributions are welcome! Please open an issue or submit a pull request on GitH ## Author Gomodoro is developed by [iamthefij](https://github.com/iamthefij). -