Parse always add time info if grammar error
LuisMorenoSerrano opened this issue · comments
Luis Moreno commented
Problem
tree-sitter parse
and a file with a grammar error always adds a line at the end that shows the same information as if the --time
flag had been activated.
This behavior is caused by:
tree-sitter/cli/src/parse.rs
...
if first_error.is_some() || opts.print_time {
...
Why show execution time when an error occurs, even if the corresponding flag --time
has not been specified?
Expected behavior
I think it is not a good idea to mix both situations in the same piece of code, or at least redirect this kind of error info via stderr
instead of stdout
.