From ac6c16de323bdcecf08446ee15e062faeb452225 Mon Sep 17 00:00:00 2001
From: a <eddy@gfxlabs.io>
Date: Thu, 20 Jul 2023 21:15:45 +0000
Subject: [PATCH] Add new file

---
 .golangci.yml | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)
 create mode 100644 .golangci.yml

diff --git a/.golangci.yml b/.golangci.yml
new file mode 100644
index 0000000..0fd8eaa
--- /dev/null
+++ b/.golangci.yml
@@ -0,0 +1,90 @@
+run:
+  deadline: 10m
+  skip-dirs:
+    - hack
+
+linters:
+  disable-all: true
+  enable:
+    - gofmt
+    - errcheck
+    - gosimple
+    - govet
+    - ineffassign
+    - staticcheck
+    - gocritic
+    - bodyclose
+    - gosec
+    - prealloc
+    - unconvert
+    - unused
+    - cyclop
+
+linters-settings:
+  cyclop:
+    max-complexity: 20
+    
+  gocritic:
+    # Which checks should be enabled; can't be combined with 'disabled-checks';
+    # See https://go-critic.github.io/overview#checks-overview
+    # To check which checks are enabled run `GL_DEBUG=gocritic ./build/bin/golangci-lint run`
+    # By default list of stable checks is used.
+    enabled-checks:
+      - ruleguard
+      - truncateCmp
+
+    # Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
+    disabled-checks:
+      - captLocal
+      - assignOp
+      - paramTypeCombine
+      - importShadow
+      - commentFormatting
+
+    # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
+    # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
+    enabled-tags:
+      - performance
+      - diagnostic
+      - opinionated
+    disabled-tags:
+      - experimental
+    settings:
+      hugeParam:
+        # size in bytes that makes the warning trigger (default 80)
+        sizeThreshold: 1000
+      rangeExprCopy:
+        # size in bytes that makes the warning trigger (default 512)
+        sizeThreshold: 512
+        # whether to check test functions (default true)
+        skipTestFuncs: true
+      truncateCmp:
+        # whether to skip int/uint/uintptr types (default true)
+        skipArchDependent: true
+      underef:
+        # whether to skip (*x).method() calls where x is a pointer receiver (default true)
+        skipRecvDeref: true
+
+  govet:
+    disable:
+      - deepequalerrors
+      - fieldalignment
+      - shadow
+      - unsafeptr
+  goconst:
+    min-len: 2
+    min-occurrences: 2
+  gofmt:
+    auto-fix: false
+
+issues:
+  exclude-rules:
+    - linters:
+        - golint
+      text: "should be"
+    - linters:
+        - errcheck
+      text: "not checked"
+    - linters:
+        - staticcheck
+      text: "SA(1019|1029|5011)"
-- 
GitLab