Skip to content

build(deps): bump golangci/golangci-lint-action from 6.5.2 to 7.0.0 #54

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

Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: lint
uses: golangci/golangci-lint-action@v6.5.2
uses: golangci/golangci-lint-action@v7.0.0
with:
version: latest

Expand Down
151 changes: 81 additions & 70 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,90 +1,101 @@
linters-settings:
gocyclo:
min-complexity: 15
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 3
misspell:
locale: US
lll:
line-length: 140
goimports:
local-prefixes: github.com/gotd/tl
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- hugeParam
- rangeValCopy
- exitAfterDefer
- whyNoLint
- singleCaseSwitch

version: "2"
linters:
disable-all: true
default: none
enable:
- dogsled
- dupl
- errcheck
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
- gochecknoglobals
- gocognit

# Do not enable:
# - wsl (too opinionated about newlines)
# - godox (todos are OK)
# - bodyclose (false positives on helper functions)
# - prealloc (not worth it in scope of this project)
# - maligned (same as prealloc)
# - funlen (gocyclo is enough)

issues:
exclude-rules:
# TODO(ernado): Should we refactor Parse() functions?
- linters: [gocyclo, gocognit]
text: "Parse"

# Disable linters that are annoying in tests.
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- funlen
- goconst
- gocognit
- scopelint
- lll
- gochecknoglobals
# Ignore shadowing of err.
- linters: [govet]
text: 'declaration of "err"'
# Ignore linters in main packages.
- path: main\.go
linters: [gochecknoglobals, goconst, funlen, gocognit, gocyclo]
settings:
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 3
gocritic:
disabled-checks:
- hugeParam
- rangeValCopy
- exitAfterDefer
- whyNoLint
- singleCaseSwitch
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
gocyclo:
min-complexity: 15
lll:
line-length: 140
misspell:
locale: US
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- gocognit
- gocyclo
text: Parse
- linters:
- dupl
- errcheck
- funlen
- gochecknoglobals
- gocognit
- goconst
- gocyclo
- gosec
- lll
- scopelint
path: _test\.go
- linters:
- govet
text: declaration of "err"
- linters:
- funlen
- gochecknoglobals
- gocognit
- goconst
- gocyclo
path: main\.go
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
settings:
goimports:
local-prefixes:
- github.com/gotd/tl
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
Loading