Migrate golangci-lint config to v2 (#2781)

Signed-off-by: Matej Vašek <mvasek@redhat.com>
This commit is contained in:
Matej Vašek 2025-04-11 15:27:14 +02:00 committed by GitHub
parent b67d8d4405
commit c12828fd08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 32 additions and 26 deletions

View File

@ -1,31 +1,37 @@
# version: "2"
# golangci-lint
#
# For defaults, see:
# https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
#
#
#
run:
timeout: 5m
linters: linters:
enable: enable:
- unconvert - unconvert
- prealloc - prealloc
- bodyclose - bodyclose
exclusions:
issues: generated: lax
exclude-rules: presets:
- linters: - comments
- staticcheck - common-false-positives
# Error Text: - legacy
# "SA9004: only the first constant in this group has an explicit type" - std-error-handling
# Efect: rules:
# Allows short-hand first constant type declarations: - linters:
# Example: - staticcheck
# const ( # Error Text:
# Name Type = "value" # "SA9004: only the first constant in this group has an explicit type"
# Name2 = "value2" # Efect:
# ) # Allows short-hand first constant type declarations:
text: "SA9004:" # Example:
# const (
# Name Type = "value"
# Name2 = "value2"
# )
text: 'SA9004:'
paths:
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$