(pass *analysis.Pass, call *ast.CallExpr, outerStore outerStoreMatcher)
| 200 | ) |
| 201 | |
| 202 | func classifyCall(pass *analysis.Pass, call *ast.CallExpr, outerStore outerStoreMatcher) (misuseKind, token.Pos) { |
| 203 | if receiver := callReceiver(call); receiver != nil && outerStore.matches(pass, receiver) { |
| 204 | return misuseDirect, receiver.Pos() |
| 205 | } |
| 206 | |
| 207 | for _, arg := range call.Args { |
| 208 | if outerStore.matches(pass, arg) { |
| 209 | return misusePassThrough, arg.Pos() |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | return misuseNone, token.NoPos |
| 214 | } |
| 215 | |
| 216 | func bodyUsesOuterStore(pass *analysis.Pass, body *ast.BlockStmt, outerStore outerStoreMatcher) bool { |
| 217 | outerStore = outerStore.withAliases(pass, body) |
no test coverage detected