Skip to content

Commit

Permalink
ci: add misspell, nakedret, and predeclared linter
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrinds committed Dec 2, 2024
1 parent a0f08e5 commit 2acaa6e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,25 @@ linters:
- intrange
- makezero
- mirror
- misspell
- nakedret
- nilerr
- nolintlint
- nonamedreturns
- nosprintfhostport
- perfsprint
- prealloc
- predeclared
- reassign
- recvcheck
- revive
- sloglint
- staticcheck
- stylecheck
- tenv
- testableexamples
- testifylint
- thelper
- testableexamples
- typecheck
- unconvert
- unparam
Expand Down
4 changes: 2 additions & 2 deletions cmd/poller/collector/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/netapp/harvest/v2/cmd/poller/plugin/aggregator"
"github.com/netapp/harvest/v2/cmd/poller/plugin/changelog"
"github.com/netapp/harvest/v2/cmd/poller/plugin/labelagent"
"github.com/netapp/harvest/v2/cmd/poller/plugin/max"
"github.com/netapp/harvest/v2/cmd/poller/plugin/maxplugin"
"github.com/netapp/harvest/v2/cmd/poller/plugin/metricagent"
"github.com/netapp/harvest/v2/pkg/conf"
"github.com/netapp/harvest/v2/pkg/errs"
Expand Down Expand Up @@ -222,7 +222,7 @@ func GetBuiltinPlugin(name string, abc *plugin.AbstractPlugin) plugin.Plugin {
}

if name == "Max" {
return max.New(abc)
return maxplugin.New(abc)
}

if name == "LabelAgent" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright NetApp Inc, 2022 All rights reserved
*/

package max
package maxplugin

import (
"github.com/netapp/harvest/v2/cmd/poller/plugin"
Expand Down
2 changes: 1 addition & 1 deletion cmd/tools/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/netapp/harvest/v2/cmd/poller/plugin"
"github.com/netapp/harvest/v2/cmd/poller/plugin/aggregator"
"github.com/netapp/harvest/v2/cmd/poller/plugin/labelagent"
max2 "github.com/netapp/harvest/v2/cmd/poller/plugin/max"
max2 "github.com/netapp/harvest/v2/cmd/poller/plugin/maxplugin"
"github.com/netapp/harvest/v2/cmd/poller/plugin/metricagent"
"github.com/netapp/harvest/v2/pkg/conf"
"github.com/netapp/harvest/v2/pkg/errs"
Expand Down
2 changes: 1 addition & 1 deletion integration/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/shirou/gopsutil/v4 v4.24.10 // indirect
github.com/shirou/gopsutil/v4 v4.24.11 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tidwall/match v1.1.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions integration/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/shirou/gopsutil/v4 v4.24.10 h1:7VOzPtfw/5YDU+jLEoBwXwxJbQetULywoSV4RYY7HkM=
github.com/shirou/gopsutil/v4 v4.24.10/go.mod h1:s4D/wg+ag4rG0WO7AiTj2BeYCRhym0vM7DHbZRxnIT8=
github.com/shirou/gopsutil/v4 v4.24.11 h1:WaU9xqGFKvFfsUv94SXcUPD7rCkU0vr/asVdQOBZNj8=
github.com/shirou/gopsutil/v4 v4.24.11/go.mod h1:s4D/wg+ag4rG0WO7AiTj2BeYCRhym0vM7DHbZRxnIT8=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
Expand Down

0 comments on commit 2acaa6e

Please sign in to comment.