Analyzer::Elixir::Plug
Inherits Analyzer::Elixir::ElixirEngine < FileScanEngine < Analyzer < FileHelper < Reference < Object
Constants
File-level gate: Plug.Router only registers absolute paths via the
verb/match/forward macros. Files with none of those tokens
cannot contribute endpoints (models, views, plain modules).
The route macro must start a fresh token. Without the
(?:^|[^.\w]) guard the bare verb matched as a substring of any
identifier — @temp_slot_options "TEMPORARY …" read as an
options route, Repo.delete "x" as a delete route — flooding
non-router modules with junk endpoints. The captured path is also
required to start with /, because the Plug.Router DSL only ever
registers absolute paths; that single constraint drops the
remaining get "true"-style false positives.
Precompiled per-verb route regexes. line_to_endpoint runs once per
line of every .ex file, and Regex.new rebuilt these 8 PCRE2
patterns on every call — the same recompilation cost the Phoenix
analyzer carried. Build them once.
Class methods
Instance methods
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.