Skip to content

Commit

Permalink
Run linter
Browse files Browse the repository at this point in the history
  • Loading branch information
macabu committed Dec 17, 2023
1 parent f4d0738 commit b968ed6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*.dll
*.so
*.dylib
inamedparam

# Test binary, built with `go test -c`
*.test
Expand Down
2 changes: 1 addition & 1 deletion inamedparam.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
continue
}

// TODO: add test case to reproduce this. Help wanted.
// Improvement: add test case to reproduce this. Help wanted.
if len(method.Names) == 0 {
continue
}
Expand Down
6 changes: 5 additions & 1 deletion inamedparam_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ func TestAnalyzerSkipSingleParam(t *testing.T) {
testdata := testutil.WithModules(t, analysistest.TestData(), nil)

analyzer := inamedparam.Analyzer
analyzer.Flags.Set("skip-single-param", "true")

err := analyzer.Flags.Set("skip-single-param", "true")
if err != nil {
t.Fatalf("failed to set skip-single-param flag: %v", err)
}

analysistest.Run(t, testdata, analyzer, "params")
}

0 comments on commit b968ed6

Please sign in to comment.