diff --git a/.gitignore b/.gitignore index 3b735ec..f8d51e9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.dll *.so *.dylib +inamedparam # Test binary, built with `go test -c` *.test diff --git a/inamedparam.go b/inamedparam.go index 5176095..70ae4b8 100644 --- a/inamedparam.go +++ b/inamedparam.go @@ -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 } diff --git a/inamedparam_test.go b/inamedparam_test.go index edb3e2a..dd89106 100644 --- a/inamedparam_test.go +++ b/inamedparam_test.go @@ -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") }