class Analyzer

Included Modules

Direct Known Subclasses

Defined in:

models/analyzer.cr

Constant Summary

DEFAULT_CHANNEL_CAPACITY = 128
DEFAULT_CONTENT_CHANNEL_CAPACITY = 16
MAX_ANALYZER_WORKERS = 64

Constructors

Macro Summary

Instance Method Summary

Instance methods inherited from module FileHelper

all_files : Array(String) all_files, get_files_by_extension(extension : String) : Array(String) get_files_by_extension, get_files_by_prefix(prefix : String) : Array(String) get_files_by_prefix, get_files_by_prefix_and_extension(prefix : String, extension : String) : Array(String) get_files_by_prefix_and_extension, get_public_dir_files(base_path : String, folder : String) : Array(String) get_public_dir_files, get_public_files(base_path : String, anchors : Array(String) = ["shard.yml", "Gemfile"]) : Array(String) get_public_files, populate_channel_with_files(channel : Channel(String)) populate_channel_with_files, populate_channel_with_filtered_files(channel : Channel(String), extension : String)
populate_channel_with_filtered_files(channel : Channel(String), extensions : Array(String))
populate_channel_with_filtered_files

Constructor Detail

def self.new(options : Hash(String, YAML::Any)) #

[View source]

Macro Detail

macro define_getter_methods(names) #

[View source]

Instance Method Detail

def analyze #

[View source]
def base_path : String #

[View source]
def base_paths : Array(String) #

[View source]
def callees_needed? : Bool #

Callees feed --include-callee (direct output) and --ai-context (aggregated review context). Analyzers should consult this before running their callee extractor so the work is skipped on default scans where neither flag is set.


[View source]
def logger : NoirLogger #

[View source]
def parallel_analyze(channel : Channel(String), &block : String -> Nil) #

[View source]
def read_file_content(path : String) : String #

Prefer the detector-populated cache over a fresh disk read. On cache miss (budget exhausted, cache cleared between runs, path not registered via register_file) falls back to File.read.

Analyzers migrating from direct File.read(path, ...) calls should use this helper so the second read of files the detector already loaded is free.


[View source]
def result : Array(Endpoint) #

[View source]
def url : String #

[View source]