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

Method collectAlias

scripts/intxcheck/analyzer.go:366–378  ·  view source on GitHub ↗
(pass *analysis.Pass, base outerStoreMatcher, lhs ast.Expr, rhs ast.Expr)

Source from the content-addressed store, hash-verified

364}
365
366func (m *outerStoreMatcher) collectAlias(pass *analysis.Pass, base outerStoreMatcher, lhs ast.Expr, rhs ast.Expr) {
367 lhsForm, ok := declaredIdentForm(pass, lhs)
368 if !ok {
369 return
370 }
371
372 switch {
373 case base.matches(pass, rhs):
374 m.addStoreForm(lhsForm)
375 case base.matchesOwner(pass, rhs):
376 m.addOwnerForm(lhsForm)
377 }
378}
379
380func (m outerStoreMatcher) withReceiver(pass *analysis.Pass, decl *ast.FuncDecl) (outerStoreMatcher, bool) {
381 recvForm, ok := receiverForm(pass, decl)

Callers 1

withAliasesMethod · 0.80

Calls 5

addStoreFormMethod · 0.95
addOwnerFormMethod · 0.95
declaredIdentFormFunction · 0.85
matchesMethod · 0.80
matchesOwnerMethod · 0.80

Tested by

no test coverage detected