Skip to content

Commit

Permalink
update config to ignore errcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
chouetz committed Nov 9, 2024
1 parent dad5c21 commit 0dcbe0f
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,20 @@ linters-settings:

errcheck:
exclude-functions:
# - fmt:.*
# - github.com/DataDog/datadog-agent/pkg/util/log:.*
# - github.com/DataDog/datadog-agent/comp/core/log:.*
# - github.com/cihub/seelog:.*
# - net/http:Write
# - github.com/DataDog/datadog-agent/pkg/trace/metrics:.*
# - github.com/DataDog/datadog-agent/pkg/collector/corechecks:Warnf?
# - golang.org/x/sys/windows:(CloseHandle|FreeLibrary|FreeSid|RegCloseKey|SetEvent|LocalFree)
# - syscall:CloseHandle
# - golang.org/x/sys/windows/svc/mgr:Disconnect
# - golang.org/x/sys/windows/svc/debug:(Close|Error|Info|Warning)
# - github.com/lxn/walk:Dispose
# - github.com/DataDog/datadog-agent/comp/core/flare/types:(AddFile.*|CopyDir.*|CopyFile.*)
# - golang.org/x/sys/windows/registry:Close
- (*github.com/DataDog/datadog-agent/pkg/collector/corechecks.CheckBase).Warn
- (*github.com/DataDog/datadog-agent/pkg/collector/corechecks.CheckBase).Warnf
- (*github.com/lxn/walk.NotifyIcon).Dispose
Expand All @@ -111,13 +125,28 @@ linters-settings:
- (github.com/DataDog/datadog-agent/comp/core/flare/builder.FlareBuilder).CopyDirToWithoutScrubbing
- (github.com/DataDog/datadog-agent/comp/core/flare/builder.FlareBuilder).CopyFile
- (github.com/DataDog/datadog-agent/comp/core/flare/builder.FlareBuilder).CopyFileTo
- (github.com/DataDog/datadog-agent/comp/core/flare/types.FlareBuilder).AddFile
- (github.com/DataDog/datadog-agent/comp/core/flare/types.FlareBuilder).AddFileFromFunc
- (github.com/DataDog/datadog-agent/comp/core/flare/types.FlareBuilder).AddFileWithoutScrubbing
- (github.com/DataDog/datadog-agent/comp/core/flare/types.FlareBuilder).CopyDir
- (github.com/DataDog/datadog-agent/comp/core/flare/types.FlareBuilder).CopyDirTo
- (github.com/DataDog/datadog-agent/comp/core/flare/types.FlareBuilder).CopyDirToWithoutScrubbing
- (github.com/DataDog/datadog-agent/comp/core/flare/types.FlareBuilder).CopyFile
- (github.com/DataDog/datadog-agent/comp/core/flare/types.FlareBuilder).CopyFileTo
- (github.com/DataDog/datadog-agent/comp/core/log/def.Component).ChangeLogLevel
- (github.com/DataDog/datadog-agent/comp/core/log/def.Component).Critical
- (github.com/DataDog/datadog-agent/comp/core/log/def.Component).Criticalf
- (github.com/DataDog/datadog-agent/comp/core/log/def.Component).Error
- (github.com/DataDog/datadog-agent/comp/core/log/def.Component).Errorf
- (github.com/DataDog/datadog-agent/comp/core/log/def.Component).Warn
- (github.com/DataDog/datadog-agent/comp/core/log/def.Component).Warnf
- (github.com/DataDog/datadog-agent/comp/core/log.Component).ChangeLogLevel
- (github.com/DataDog/datadog-agent/comp/core/log.Component).Critical
- (github.com/DataDog/datadog-agent/comp/core/log.Component).Criticalf
- (github.com/DataDog/datadog-agent/comp/core/log.Component).Error
- (github.com/DataDog/datadog-agent/comp/core/log.Component).Errorf
- (github.com/DataDog/datadog-agent/comp/core/log.Component).Warn
- (github.com/DataDog/datadog-agent/comp/core/log.Component).Warnf
- (net/http.ResponseWriter).Write
- fmt.Sscanf
- github.com/cihub/seelog.Warnf
Expand Down Expand Up @@ -199,9 +228,9 @@ linters-settings:
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: unused-parameter
arguments:
- allowRegex: "^_"
# - name: unused-parameter
# arguments:
# - allowRegex: "^_"
- name: var-declaration
- name: var-naming
# non-default rules:
Expand Down

0 comments on commit 0dcbe0f

Please sign in to comment.