aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-31 10:53:33 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-31 10:53:33 +0800
commitd6b7b02da63b40be5599598f35a7658f6791b974 (patch)
treebc970740edd69fbfb1710ccd5763604624aa20df
parentReformat (diff)
downloadforge-d6b7b02da63b40be5599598f35a7658f6791b974.tar.gz
forge-d6b7b02da63b40be5599598f35a7658f6791b974.tar.zst
forge-d6b7b02da63b40be5599598f35a7658f6791b974.zip
Revert "Update .golangci.yaml to v2"
This reverts commit d72458aefeabdeb97817d2609420cbb8d9968f35.
-rw-r--r--.golangci.yaml72
1 files changed, 25 insertions, 47 deletions
diff --git a/.golangci.yaml b/.golangci.yaml
index 490adf6..230efcd 100644
--- a/.golangci.yaml
+++ b/.golangci.yaml
@@ -1,53 +1,31 @@
-version: "2"
linters:
- default: all
+ enable-all: true
disable:
- - cyclop
+ - tenv
- depguard
- - err113
- - exhaustruct
- - forcetypeassert
- - funlen
- - gochecknoglobals
- - gochecknoinits
- - gocognit
- - goconst
- - gocyclo
- - godox
- - ireturn
- - lll
- - maintidx
- - mnd
- - nakedret
- - nestif
- - nlreturn
- - nonamedreturns
- - unused
- - wrapcheck
- - wsl
- exclusions:
- generated: lax
- presets:
- - comments
- - common-false-positives
- - legacy
- - std-error-handling
- paths:
- - third_party$
- - builtin$
- - examples$
+ - err113 # dynamically defined errors are fine for our purposes
+ - forcetypeassert # type assertion failures are usually programming errors
+ - gochecknoglobals # doesn't matter since this isn't a library
+ - gochecknoinits # we use inits sparingly for good reasons
+ - godox # they're just used as markers for where needs improvements
+ - ireturn # doesn't work well with how we use generics
+ - lll # long lines are acceptable
+ - mnd # it's a bit ridiculous to replace all of them
+ - nakedret # patterns should be consistent
+ - nonamedreturns # i like named returns
+ - wrapcheck # wrapping all errors is just not necessary
+ - maintidx # e
+ - nestif # e
+ - gocognit # e
+ - gocyclo # e
+ - cyclop # e
+ - goconst # e
+ - funlen # e
+ - wsl # e
+ - nlreturn # e
+ - unused # e
+ - exhaustruct # e
+
issues:
max-issues-per-linter: 0
max-same-issues: 0
-formatters:
- enable:
- - gci
- - gofmt
- - gofumpt
- - goimports
- exclusions:
- generated: lax
- paths:
- - third_party$
- - builtin$
- - examples$