Open lloeki opened 11 months ago
Hi!
Currently, you can use --save-expectations
to generate the reports in YAML format.
I'm also open to add another output format support. YAML can be relatively easily implemented on the top of the expectations output feature.
I think the location can be represented with four-attributes in structured formats -- JSON or YAML.
I think the location can be represented with four-attributes in structured formats
Oh yeah, I just took Rubocop's outpout directly and tweaked it a bit to sort of make sense in a Steep+RBS context. I was a bit surprised by all these apparently redundant values! I don't know if they're legacy carried over for backwards compatibility or if they can differ in certain corner cases.
Steep outputs pretty errors for humans to consume:
But when plugging Steep into tools it's possible yet unwieldy to parse... I did that for ALE and was able to get a surprising amount of information: start/end of multiline message, file, row, column start, severity, message, code, column end via length from the squiggly underlining. Although it works (and was fun) it's also brittle in the sense that if the pretty output changes it's going to break.
Sure there's
langserver
but in this specific case LSP doesn't quite cut it, and in some automation scenarioslangserver
just doesn't make sense.It would be quite nice if
steep check
would accept a--format
parameter, defaulting to pretty but also having stable programmatic formats such as:json
(like e.g. Rubocop has):I made up the
sigs
vsfiles
thing, dunno if it is relevant or not, maybe it should just all go intofiles
.single line,
grep
/rg
/rspec
-like:(I think the above should be unambiguously parseable fairly easily, is still somewhat human readable, and is trivially
grep
-able)e.g: