Skip to content

Commit

Permalink
chore: add golangci-lint config file for flexibility (#1649)
Browse files Browse the repository at this point in the history
* chore: add golangci-lint config file for flexibility

https://golangci-lint.run/usage/configuration/#config-file

* chore: add golangci-lint config file for flexibility
  • Loading branch information
alexandear authored Nov 9, 2023
1 parent 7bd632c commit 1242d8a
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
72 changes: 72 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# 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:
enable-all: true
disable:
- cyclop
- depguard
- dupl
- dupword
- errname
- errorlint
- exhaustive
- exhaustruct
- forcetypeassert
- funlen
- gochecknoglobals
- gocognit
- goconst
- gocyclo
- godot
- goerr113
- gomnd
- gosec
- inamedparam
- ireturn
- lll
- maintidx
- nakedret
- nestif
- nlreturn
- noctx
- nonamedreturns
- paralleltest
- perfsprint
- revive
- stylecheck
- testableexamples
- testpackage
- thelper
- tparallel
- unconvert
- unparam
- usestdlibvars
- varnamelen
- wastedassign
- whitespace
- wrapcheck
- wsl

# Deprecated linters
- deadcode
- exhaustivestruct
- golint
- ifshort
- interfacer
- maligned
- nosnakecase
- scopelint
- structcheck
- varcheck

linters-settings:
# Show all issues from a linter.
max-issues-per-linter: 0

# Show all issues with the same text.
max-same-issues: 0

0 comments on commit 1242d8a

Please sign in to comment.