aboutsummaryrefslogtreecommitdiffstats
path: root/gocapturedrefrace.go
diff options
context:
space:
mode:
Diffstat (limited to 'gocapturedrefrace.go')
-rw-r--r--gocapturedrefrace.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/gocapturedrefrace.go b/gocapturedrefrace.go
index 10ab437..1521ed0 100644
--- a/gocapturedrefrace.go
+++ b/gocapturedrefrace.go
@@ -51,6 +51,8 @@ func run(pass *analysis.Pass) (interface{}, error) {
// Inspect closure argument list.
for _, arg := range funcLit.Type.Params.List {
+ // TODO: Ignore closures passed as arguments.
+
// Report reference arguments.
_, ok := arg.Type.(*ast.StarExpr)
if !ok {
@@ -106,6 +108,8 @@ func checkClosure(pass *analysis.Pass, funcLit *ast.FuncLit) {
return true
}
+ // TODO: Ignore shadowing variables.
+
// Identifier was defined in a different scope.
if funcScope != scope {
pass.Reportf(