Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Refactor `crystal tool format` command completely #7257
Sorry, this contains some fixes and improvements:
In fact this reduces
@RX14 Each error can be combined (e.g. one file has syntax error, and another file invokes a bug.) So, using bit flag as status code is good. And, I think syntax error and invalid byte sequence error can be regarded same kind error on status code.
@MakeNowJust status codes are typically checked from bash scripts. Decoding bitflags is difficult there. So I'd suggest not doing that and having precedence rules instead: any bug is status code 3, any invalid byte sequence or syntax error is 2. Invalid command-line arguments should probably be
@RX14 When running with
Theses extended status codes don't need to go into this PR. It's an additional feature.
This doesn't really break any behaviour regarding status codes, does it? @MakeNowJust Even if it did, that doesn't mean it can't be changed again in a subsequent PR.
It doesn't touch any behavior about status-code with
I agree with @straight-shoota. This PR is ready and we can discuss about status-code in other place.
Jan 10, 2019
5 checks passed
pushed a commit
this pull request
Jan 12, 2019
referenced this pull request
Feb 4, 2019
@MakeNowJust Could you explain what you mean with this?
It was used by Sublime Text (and apparently VSCode) and it was working fine. And right now we have no option to replace this (SublimeText used the line/column info from the JSON to show a dot where a line had an error, now this is impossible because we only have a plain text error).
I think it's better to have a half-baked solution that was kind of working than completely removing it with no replacement.
Hi @asterite VSCode supports output parsing on tasks and extensions to show errors, see: https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher
However, I disabled OnFly error check (kinda workaround) to support formatting without
Thank you for your PR on sublime-crystal
@MakeNowJust Yeah, this is kinda breaking change