Skip to content
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/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
- uses: actions/checkout@v4

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: v1.63.4
version: v2.0.2
156 changes: 87 additions & 69 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,90 @@
version: "2"
run:
timeout: 5m
tests: false
issues:
exclude-rules:
- path: 'cmd/memory.go'
linters:
- funlen
- gocognit
- gocyclo
- maintidx
- path: 'cmd/filesystem.go'
linters:
- funlen
- gocognit
- maintidx
- gocyclo
- path: 'cmd/psi.go'
linters:
- funlen
- gocognit
- gocyclo
- maintidx
- path: 'internal/sensors/sensors.go'
linters:
- funlen
- gocognit
- path: 'internal/filesystem/filesystem.go'
linters:
- funlen
- gocognit
- gocyclo
- maintidx
- path: 'cmd/filesystem.go'
linters:
- nestif
- path: 'internal/netdev/netdev.go'
linters:
- deadcode
- golint
- unused
- nosnakecase
- stylecheck
- varcheck
- revive
linters:
enable-all: true
disable:
- funlen
- mnd
- dupl
- cyclop
- depguard
- exhaustruct
- forbidigo
- forcetypeassert
- gci
- gochecknoglobals
- gochecknoinits
- godox
- godot
- err113
- gofumpt
- lll
- musttag
- nakedret
- nlreturn
- nolintlint
- nonamedreturns
- tagliatelle
- varnamelen
- wrapcheck
default: all
disable:
- cyclop
- depguard
- dupl
- err113
- exhaustruct
- forbidigo
- forcetypeassert
- funlen
- gochecknoglobals
- gochecknoinits
- godot
- godox
- lll
- mnd
- musttag
- nakedret
- nlreturn
- nolintlint
- nonamedreturns
- tagliatelle
- varnamelen
- wrapcheck
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- funlen
- gocognit
- gocyclo
- maintidx
path: cmd/memory.go
- linters:
- funlen
- gocognit
- gocyclo
- maintidx
path: cmd/filesystem.go
- linters:
- funlen
- gocognit
- gocyclo
- maintidx
path: cmd/psi.go
- linters:
- funlen
- gocognit
path: internal/sensors/sensors.go
- linters:
- funlen
- gocognit
- gocyclo
- maintidx
path: internal/filesystem/filesystem.go
- linters:
- nestif
path: cmd/filesystem.go
- linters:
- deadcode
- golint
- nosnakecase
- revive
- staticcheck
- unused
- varcheck
path: internal/netdev/netdev.go
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion internal/filesystem/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/shirou/gopsutil/v3/disk"
)

// nolint: revive, golint
// nolint: revive
type FilesystemType struct {
PartStats disk.PartitionStat
UsageStats disk.UsageStat
Expand Down
Loading