From 1630a90afae6c4a959933ce6c1f5217e0f086986 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Wed, 8 Nov 2023 17:16:34 +0200 Subject: [PATCH] chore: add golangci-lint config file for flexibility https://golangci-lint.run/usage/configuration/#config-file --- .github/workflows/lint.yml | 4 ++-- .golangci.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .golangci.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cc4d446fc8..cd41c03a82 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,5 +16,5 @@ jobs: - name: Run golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.54.2 - args: --enable=nolintlint,gochecknoinits,bodyclose,gofumpt,gocritic --verbose + version: v1.55.2 + args: --verbose diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000000..1bc95ab2b1 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,29 @@ +# This file contains configuration options for golangci-lint. +# https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml + +run: + # Timeout for analysis. + timeout: 5m + +linters: + # Disable all linters to prevent appearing new issues on golangci-lint update. + disable-all: true + enable: + - bodyclose + - errcheck + - gochecknoinits + - gocritic + - gofumpt + - gosimple + - govet + - ineffassign + - nolintlint + - staticcheck + - unused + +linters-settings: + # Show all issues from a linter. + max-issues-per-linter: 0 + + # Show all issues with the same text. + max-same-issues: 0