class

Analyzer::CSharp::AspNetMvc

Inherits Analyzer::CSharp::Common < Analyzer < FileHelper < Reference < Object

Constants

ATTRIBUTE_ROUTE_PATTERNS = ["HttpGet", "HttpPost", "HttpPut", "HttpDelete", "HttpPatch", "Route"].to_h do |attribute| {attribute, /\[#{attribute}[^(]*\(\s*"([^"]+)"/} end

Crystal recompiles an interpolated regex literal on every evaluation (a full PCRE2 JIT compile). The attribute set is fixed, so precompile the route-extraction matchers once at load time.

Class methods

tech_name
Source

Instance methods

analyze
Source
tech

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.

Source