Documentation
¶
Index ¶
- type ASTCache
- func (c *ASTCache) Get(filePath string) (*ast.File, *token.FileSet, bool)
- func (c *ASTCache) Invalidate(filePath string)
- func (c *ASTCache) InvalidateAll()
- func (c *ASTCache) Set(filePath string, file *ast.File, fset *token.FileSet)
- func (c *ASTCache) Size() int
- func (c *ASTCache) Stats() CacheStats
- type Analyzer
- type CacheStats
- type CrossFileAnalyzer
- type FileScanner
- type FunctionInfo
- type ParallelAnalyzer
- func (a *ParallelAnalyzer) Analyze(ctx context.Context, filePath string, config core.Config) ([]core.Result, error)
- func (a *ParallelAnalyzer) AnalyzeFiles(ctx context.Context, filePaths []string, config core.Config) []core.Result
- func (a *ParallelAnalyzer) Name() string
- func (a *ParallelAnalyzer) SupportedExtensions() []string
- func (a *ParallelAnalyzer) WorkerCount() int
- type Parser
- func (p *Parser) CalculateFunctionMetrics(ctx context.Context, funcDecl *ast.FuncDecl, fset *token.FileSet, ...) (*rules.FunctionMetrics, error)
- func (p *Parser) CalculateMetrics(ctx context.Context, filePath string, file *ast.File) (*rules.FileMetrics, error)
- func (p *Parser) ParseFile(ctx context.Context, filePath string) (*ast.File, *token.FileSet, error)
- func (p *Parser) SetCache(cache *ASTCache)
- type Similarity
- type SimilarityAnalyzer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASTCache ¶
type ASTCache struct {
// contains filtered or unexported fields
}
func NewASTCache ¶
func (*ASTCache) Invalidate ¶
func (*ASTCache) InvalidateAll ¶
func (c *ASTCache) InvalidateAll()
func (*ASTCache) Stats ¶
func (c *ASTCache) Stats() CacheStats
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
Analyzer implements the core.Analyzer interface for Go
func NewAnalyzer ¶
NewAnalyzer creates a new Go analyzer
func (*Analyzer) Analyze ¶
func (a *Analyzer) Analyze(ctx context.Context, filePath string, config core.Config) ([]core.Result, error)
Analyze analyzes a Go file and returns results
func (*Analyzer) SupportedExtensions ¶
SupportedExtensions returns the file extensions supported by this analyzer
type CacheStats ¶
type CrossFileAnalyzer ¶
type CrossFileAnalyzer struct {
// contains filtered or unexported fields
}
func NewCrossFileAnalyzer ¶
func NewCrossFileAnalyzer() *CrossFileAnalyzer
func (*CrossFileAnalyzer) AnalyzeDirectory ¶
func (a *CrossFileAnalyzer) AnalyzeDirectory(ctx context.Context, dirPath string) error
func (*CrossFileAnalyzer) FindUnusedFunctions ¶
func (a *CrossFileAnalyzer) FindUnusedFunctions() []core.Result
func (*CrossFileAnalyzer) GetCallGraph ¶
func (a *CrossFileAnalyzer) GetCallGraph() map[string][]string
type FileScanner ¶
type FileScanner struct {
// contains filtered or unexported fields
}
FileScanner scans directories for Go files
func NewFileScanner ¶
func NewFileScanner() *FileScanner
NewFileScanner creates a new Go file scanner
type FunctionInfo ¶
type ParallelAnalyzer ¶
type ParallelAnalyzer struct {
// contains filtered or unexported fields
}
func NewParallelAnalyzer ¶
func NewParallelAnalyzer(config core.Config, workers int) *ParallelAnalyzer
func (*ParallelAnalyzer) AnalyzeFiles ¶
func (*ParallelAnalyzer) Name ¶
func (a *ParallelAnalyzer) Name() string
func (*ParallelAnalyzer) SupportedExtensions ¶
func (a *ParallelAnalyzer) SupportedExtensions() []string
func (*ParallelAnalyzer) WorkerCount ¶
func (a *ParallelAnalyzer) WorkerCount() int
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) CalculateFunctionMetrics ¶
func (*Parser) CalculateMetrics ¶
type Similarity ¶
type SimilarityAnalyzer ¶
type SimilarityAnalyzer struct {
// contains filtered or unexported fields
}
func NewSimilarityAnalyzer ¶
func NewSimilarityAnalyzer() *SimilarityAnalyzer
func (*SimilarityAnalyzer) AnalyzeDirectory ¶
Click to show internal directories.
Click to hide internal directories.