mirror of
https://github.com/golang/go
synced 2024-11-06 11:26:12 -07:00
88b9c284fd
This change adds a pass that checks for unused parameters inside of a function. It is disabled by default. Updates golang/go#36602 Change-Id: I9e8de3368f16f27e7816ec4ddb16935e1a05584e Reviewed-on: https://go-review.googlesource.com/c/tools/+/222817 Run-TryBot: Rohan Challa <rohan@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
18 lines
439 B
Go
18 lines
439 B
Go
// Copyright 2020 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package unusedparams_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"golang.org/x/tools/go/analysis/analysistest"
|
|
"golang.org/x/tools/internal/lsp/analysis/unusedparams"
|
|
)
|
|
|
|
func Test(t *testing.T) {
|
|
testdata := analysistest.TestData()
|
|
analysistest.Run(t, testdata, unusedparams.Analyzer, "a")
|
|
}
|