MCPcopy Index your code
hub / github.com/coder/coder / newOuterStoreMatcher

Function newOuterStoreMatcher

scripts/intxcheck/analyzer.go:305–322  ·  view source on GitHub ↗
(pass *analysis.Pass, expr ast.Expr)

Source from the content-addressed store, hash-verified

303}
304
305func newOuterStoreMatcher(pass *analysis.Pass, expr ast.Expr) (outerStoreMatcher, bool) {
306 display := exprString(expr)
307 if display == "" {
308 return outerStoreMatcher{}, false
309 }
310
311 matcher := outerStoreMatcher{display: display}
312 matcher.addStoreForm(exprFormFor(pass, expr))
313
314 selector, ok := unparen(expr).(*ast.SelectorExpr)
315 if !ok {
316 return matcher, true
317 }
318
319 matcher.fieldSuffix = "." + selector.Sel.Name
320 matcher.addOwnerForm(exprFormFor(pass, selector.X))
321 return matcher, true
322}
323
324func (m outerStoreMatcher) withAliases(pass *analysis.Pass, body *ast.BlockStmt) outerStoreMatcher {
325 base := m

Callers 1

runFunction · 0.85

Calls 5

addStoreFormMethod · 0.95
addOwnerFormMethod · 0.95
exprStringFunction · 0.85
exprFormForFunction · 0.85
unparenFunction · 0.85

Tested by

no test coverage detected