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

Function exprFormFor

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

Source from the content-addressed store, hash-verified

475}
476
477func exprFormFor(pass *analysis.Pass, expr ast.Expr) exprForm {
478 text := exprString(expr)
479 if text == "" {
480 return exprForm{}
481 }
482
483 ident, suffix, ok := rootIdentAndSuffix(expr)
484 if !ok {
485 return exprForm{text: text}
486 }
487
488 return exprForm{
489 text: text,
490 root: identObject(pass, ident),
491 suffix: suffix,
492 }
493}
494
495func receiverForm(pass *analysis.Pass, decl *ast.FuncDecl) (exprForm, bool) {
496 if decl.Recv == nil || len(decl.Recv.List) == 0 {

Callers 3

newOuterStoreMatcherFunction · 0.85
matchesMethod · 0.85
matchesOwnerMethod · 0.85

Calls 3

exprStringFunction · 0.85
rootIdentAndSuffixFunction · 0.85
identObjectFunction · 0.85

Tested by

no test coverage detected