Exograph.Reach.SourceSmellAudit (exograph v0.9.2)

Copy Markdown View Source

Audits Reach source-pattern smell checks against an Exograph index.

This module is intended for Reach rule development: pass one or more Reach smell check modules, scan a broad Exograph corpus, and inspect real examples for false positives. It only consumes checks that expose Reach's __reach_pattern_check__/0 metadata, which is produced by Reach.Smell.Check.Source.

Summary

Functions

Loads source-pattern metadata from Reach smell modules.

Scans index with source-pattern Reach smell modules.

Functions

load_patterns!(modules)

@spec load_patterns!([module()]) :: [Exograph.Reach.SourceSmellAudit.Pattern.t()]

Loads source-pattern metadata from Reach smell modules.

scan(index, modules, opts \\ [])

Scans index with source-pattern Reach smell modules.

Options:

  • :limit - maximum findings returned, default 100.
  • :candidate_batch_size - fragment candidate page size. Defaults to 1000 for anchor mode and 8000 for exact mode.
  • :max_anchor_candidates - skip patterns whose best indexed anchor appears in more fragments than this, default 10000.
  • :candidate_mode - :anchor for fast first results or :exact to precompute candidates matching each pattern's full required term set.
  • :verify_concurrency - maximum concurrent AST verification tasks, default min(System.schedulers_online(), 8).