Ragex.Analyzers.Directory (Ragex v0.32.2)

View Source

Analyzes entire directories recursively, detecting and analyzing files based on their extensions.

This module provides batch analysis capabilities for entire projects.

Summary

Functions

Analyzes all supported files in a directory recursively.

Analyzes multiple files and stores results in the graph.

Functions

analyze_directory(path, opts \\ [])

@spec analyze_directory(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Analyzes all supported files in a directory recursively.

Returns a summary of analyzed files and any errors encountered.

Options

  • :max_depth - Maximum directory depth (default: 10)
  • :exclude_patterns - Patterns to exclude (default: common build dirs)
  • :incremental - Enable incremental updates (default: true)
  • :force_refresh - Force full refresh even if unchanged (default: false)
  • :notify - Send MCP progress notifications (default: true)
  • :timeout - Per-file analysis timeout in ms (default: 300_000 = 5 min)
  • :max_concurrency - Max parallel file analyses (default: 4)
  • :load_project - Switch the store to path as the active project, clearing previously loaded graph data first (default: true). Pass false when batch-analyzing several independent directories that should accumulate into the same graph instead of replacing each other (e.g. :auto_analyze_dirs).

analyze_files(file_paths, opts \\ [])

@spec analyze_files(
  [String.t()],
  keyword()
) :: {:ok, map()}

Analyzes multiple files and stores results in the graph.

Options

  • :incremental - Skip unchanged files (default: true)
  • :force_refresh - Force analysis even if unchanged (default: false)
  • :notify - Send MCP progress notifications (default: true)
  • :timeout - Per-file analysis timeout in ms (default: 300_000 = 5 min)
  • :max_concurrency - Max parallel file analyses (default: 4)