mirror of
https://github.com/mgechev/revive.git
synced 2025-11-23 22:04:49 +02:00
fix(1007): return Sel.Name as FuncName when selector is an CallExpr (#1012)
Signed-off-by: lsytj0413 <511121939@qq.com>
This commit is contained in:
15
testdata/add-constant.go
vendored
15
testdata/add-constant.go
vendored
@@ -1,10 +1,25 @@
|
||||
package fixtures
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
type testLogger struct{}
|
||||
|
||||
func (l *testLogger) Info(ctx context.Context, msg string) {}
|
||||
|
||||
func getLogger() *testLogger {
|
||||
return &testLogger{}
|
||||
}
|
||||
|
||||
func test1007() {
|
||||
getLogger().Info(context.Background(), "test1007")
|
||||
getLogger().Info(context.Background(), "test1007")
|
||||
getLogger().Info(context.Background(), "test1007")
|
||||
}
|
||||
|
||||
func foo(a float32, b string, c any, d int) {
|
||||
a = 1.0 // ignore
|
||||
b = "ignore"
|
||||
|
||||
Reference in New Issue
Block a user