Skip to content

Commit

Permalink
review: fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Nov 16, 2024
1 parent 263a995 commit 13a63bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

// NewAnalyzer returns a new analyzer to check for receiver type consistency.
func NewAnalyzer(s Setting) *analysis.Analyzer {
func NewAnalyzer(s Settings) *analysis.Analyzer {
// Default excludes for Marshal/Encode methods https://github.com/raeperd/recvcheck/issues/7
excludedMethods := map[string]struct{}{
"MarshalText": {},
Expand All @@ -34,8 +34,8 @@ func NewAnalyzer(s Setting) *analysis.Analyzer {
}
}

// Setting is the configuration for the analyzer.
type Setting struct {
// Settings is the configuration for the analyzer.
type Settings struct {
// DisableBuiltin if true, disables the built-in method excludes.
// Built-in excluded methods:
// - "MarshalText"
Expand Down
2 changes: 1 addition & 1 deletion analyzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func TestAnalyzer(t *testing.T) {
analysistest.Run(t, analysistest.TestData(), recvcheck.NewAnalyzer(recvcheck.Setting{}), "test")
analysistest.Run(t, analysistest.TestData(), recvcheck.NewAnalyzer(recvcheck.Settings{}), "test")
}
2 changes: 1 addition & 1 deletion cmd/recvcheck/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func main() {
flag.BoolVar(&noBuiltinExcludeMethod, "no-builtin-exclude-method", false,
`disables the default exclude methods such as "MarshalJSON"`)

setting := recvcheck.Setting{
setting := recvcheck.Settings{
DisableBuiltin: noBuiltinExcludeMethod,
}
singlechecker.Main(recvcheck.NewAnalyzer(setting))
Expand Down

0 comments on commit 13a63bc

Please sign in to comment.