chore: Enable asciicheck, asasalint, bidichk and exportloopref linters (#12169)

This commit is contained in:
Paweł Żak 2022-11-07 11:07:10 +01:00 committed by GitHub
parent ccf3b1affe
commit 0955bd714f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -2,8 +2,12 @@ linters:
disable-all: true disable-all: true
enable: enable:
# - telegraflinter # - telegraflinter
- asciicheck
- asasalint
- bidichk
- bodyclose - bodyclose
- dogsled - dogsled
- exportloopref
- errcheck - errcheck
- goprintffuncname - goprintffuncname
- gosimple - gosimple

View File

@ -174,9 +174,10 @@ func (c *CloudWatchLogs) Connect() error {
queryToken = logGroupsOutput.NextToken queryToken = logGroupsOutput.NextToken
for _, logGroup := range logGroupsOutput.LogGroups { for _, logGroup := range logGroupsOutput.LogGroups {
if *(logGroup.LogGroupName) == c.LogGroup { lg := logGroup
if *(lg.LogGroupName) == c.LogGroup {
c.Log.Debugf("Found log group %q", c.LogGroup) c.Log.Debugf("Found log group %q", c.LogGroup)
c.lg = &logGroup //nolint:revive c.lg = &lg
} }
} }
} }

View File

@ -80,7 +80,7 @@ func (l *DebugLogger) Printf(format string, v ...interface{}) {
} }
func (l *DebugLogger) Println(v ...interface{}) { func (l *DebugLogger) Println(v ...interface{}) {
l.Print(v) l.Print(v...)
} }
func ValidateTopicSuffixMethod(method string) error { func ValidateTopicSuffixMethod(method string) error {