I often forget to put a space after a colon... for example
def area(r:Room)
end
It would be nice if the crystal formatter just fixed that for me instead of complaining about it.
If it can complain about it, it should be able to fix it.
We _could_ do this.
The thing is, the formatter works like this:
but step 1 already fails for area(r:Room) as a syntax error, so there's no way we can fix it in step 2
That is, unless in step 1 we say "allow that to be a valid syntax" and then we fix it. But it's a bit strange, the formatter doesn't do that at all in any case.
Thoughts?
Yes we could. And it might be useful. But IMO it should have low priority. It's a quality of life feature but not very important.
Most helpful comment
Yes we could. And it might be useful. But IMO it should have low priority. It's a quality of life feature but not very important.