From 14475afefb00b73a4d566b5ca2b91ffc7561d5b0 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Sun, 15 Dec 2024 20:08:58 +0300 Subject: [PATCH] snatch --- .github/workflows/linter.yml | 2 +- .golangci.pipeline.yml | 41 ++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .golangci.pipeline.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index b98ae8e..0039d63 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -16,4 +16,4 @@ jobs: uses: golangci/golangci-lint-action@v3 with: version: v1.53 - args: --timeout=5m + args: --timeout=5m --config=./.golangci.pipeline.yml diff --git a/.golangci.pipeline.yml b/.golangci.pipeline.yml new file mode 100644 index 0000000..281c9d4 --- /dev/null +++ b/.golangci.pipeline.yml @@ -0,0 +1,41 @@ +run: + concurrency: 8 + timeout: 5m + issues-exit-code: 1 + tests: true + +output: + formats: colored-line-number + print-issued-lines: true + print-linter-name: true + +linters-settings: + govet: + shadow: true + dupl: + threshold: 100 + goconst: + min-len: 2 + min-occurrences: 3 + +linters: + disable-all: true + enable: + - errcheck + - goconst + - goimports + - govet + - ineffassign + - gosimple + - staticcheck + - typecheck + - revive + - unused + +issues: + exclude-use-default: false + exclude: + - G104 + - exported func .* returns unexported type .*, which can be annoying to use + - should have a package comment + - don't use an underscore in package name