struct PathInfo
- PathInfo
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
- YAML::Serializable
Defined in:
models/endpoint.crConstructors
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
-
.new(path : String, line : Int32 | Nil)
Line numbers here are 1-based, so
0is not a line — it is how a handful of analyzers spelled "this endpoint came from that file, but there is no line to point at" (HAR / mitmproxy captures have no source line at all; akka's nested route DSL had none to hand). - .new(pull : JSON::PullParser)
- .new(path : String)
Instance Method Summary
- #==(other : PathInfo) : Bool
- #line : Int32?
- #line=(line : Int32 | Nil)
- #path : String
- #path=(path : String)
Constructor Detail
Line numbers here are 1-based, so 0 is not a line — it is how a handful
of analyzers spelled "this endpoint came from that file, but there is no
line to point at" (HAR / mitmproxy captures have no source line at all;
akka's nested route DSL had none to hand). nil is the representation the
rest of the codebase already uses for that, and every consumer branches on
it: the plain and HTML reports printed a meaningless (line 0), and SARIF
emitted region.startLine: 0, which the format forbids — startLine must
be a positive integer, so the report failed validation.
Normalized here rather than at the three call sites so a future analyzer can't reintroduce it.