class
Analyzer::Go::Beego
- Analyzer::Go::Beego
- Analyzer::Go::GoEngine
- Analyzer
- Reference
- Object
Defined in:
analyzer/analyzers/go/beego.crConstant Summary
-
CONTEXT_GETTER_PATTERNS =
["GetString", "GetStrings", "GetInt", "GetInt8", "GetUint8", "GetInt16", "GetUint16", "GetInt32", "GetUint32", "GetInt64", "GetUint64", "GetBool", "GetFloat"].map do |pattern| {pattern, /#{pattern}\("([^"]*)"\)/} end -
Crystal recompiles an interpolated regex literal on every evaluation (a full PCRE2 JIT compile), and this fixed accessor set used to be rebuilt for every line — precompile it once at load time.
-
IMPORT_MARKER =
"github.com/beego/beego" -
IMPORT_MARKER_RE =
Regex.union(IMPORT_MARKER) -
One precompiled matcher instead of a
String#includes?scan per.gofile:includes?runs Rabin-Karp over the whole buffer and the marker is absent in the overwhelming majority of files in a polyglot repo, so every one of them pays the full scan. SeeAnalyzer#content_matches?.