From b968ed6d41ed6b8d0d8041fc45aa3f4a112bb0c8 Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Sun, 17 Dec 2023 12:37:16 +0100 Subject: [PATCH] Run linter --- .gitignore | 1 + inamedparam.go | 2 +- inamedparam_test.go | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) 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") }