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

Method matches

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

Source from the content-addressed store, hash-verified

395}
396
397func (m outerStoreMatcher) matches(pass *analysis.Pass, expr ast.Expr) bool {
398 form := exprFormFor(pass, expr)
399 if form.text == "" {
400 return false
401 }
402
403 for _, storeForm := range m.storeForms {
404 if sameExprForm(form, storeForm) {
405 return true
406 }
407 }
408
409 if m.fieldSuffix == "" {
410 return false
411 }
412
413 for _, ownerForm := range m.ownerForms {
414 if sameExprFormWithSuffix(form, ownerForm, m.fieldSuffix) {
415 return true
416 }
417 }
418
419 return false
420}
421
422func (m outerStoreMatcher) matchesOwner(pass *analysis.Pass, expr ast.Expr) bool {
423 if len(m.ownerForms) == 0 {

Callers 9

classifyCallFunction · 0.80
collectAliasMethod · 0.80
nameValidatorFunction · 0.80
displayNameValidatorFunction · 0.80
makeNameSchemaFunction · 0.80
makeBedrockSchemaFunction · 0.80
makeCopilotSchemaFunction · 0.80

Calls 3

exprFormForFunction · 0.85
sameExprFormFunction · 0.85
sameExprFormWithSuffixFunction · 0.85

Tested by

no test coverage detected