MCPcopy Create free account
hub / github.com/JordanCoin/codemap / AnalyzeFile

Method AnalyzeFile

scanner/astgrep.go:597–609  ·  view source on GitHub ↗
(filePath string)

Source from the content-addressed store, hash-verified

595}
596
597func (s *AstGrepScanner) AnalyzeFile(filePath string) (*FileAnalysis, error) {
598 results, err := s.ScanDirectory(filepath.Dir(filePath))
599 if err != nil {
600 return nil, err
601 }
602 base := filepath.Base(filePath)
603 for _, r := range results {
604 if filepath.Base(r.Path) == base {
605 return &r, nil
606 }
607 }
608 return nil, nil
609}

Callers 3

TestAstGrepAnalyzerFunction · 0.80
TestAstGrepPythonFunction · 0.80
TestAstGrepCSharpFunction · 0.80

Calls 1

ScanDirectoryMethod · 0.95

Tested by 3

TestAstGrepAnalyzerFunction · 0.64
TestAstGrepPythonFunction · 0.64
TestAstGrepCSharpFunction · 0.64