Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add golangci-lint config file for flexibility #1649

Merged
merged 2 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading