aboutsummaryrefslogtreecommitdiff
path: root/.golangci.yaml
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-22 13:17:55 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-22 13:32:35 +0800
commit7a6f71ac73b41a38e9982bea3d46a87c327bd77a (patch)
tree92d5b637f57080af40c2f42834282df58a4e21a3 /.golangci.yaml
parentfedauth: Use NewRequestWithContext (diff)
downloadforge-7a6f71ac73b41a38e9982bea3d46a87c327bd77a.tar.gz
forge-7a6f71ac73b41a38e9982bea3d46a87c327bd77a.tar.zst
forge-7a6f71ac73b41a38e9982bea3d46a87c327bd77a.zip
Initial linting
Diffstat (limited to '.golangci.yaml')
-rw-r--r--.golangci.yaml30
1 files changed, 30 insertions, 0 deletions
diff --git a/.golangci.yaml b/.golangci.yaml
new file mode 100644
index 0000000..71397cc
--- /dev/null
+++ b/.golangci.yaml
@@ -0,0 +1,30 @@
+linters:
+ enable-all: true
+ disable:
+ - tenv
+ - depguard
+ - 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
+ - maintidx # e
+ - nestif # e
+ - gocognit # e
+ - gocyclo # e
+ - cyclop # e
+ - goconst # e
+ - funlen # e
+ - wsl # e
+ - nlreturn # e
+ - wrapcheck # e
+ - varnamelen # e
+
+issues:
+ max-issues-per-linter: 0
+ max-same-issues: 0