Text blame is fooled by:
* changing tabs to spaces
* wrapping the call in an if block
* reformatting the call so it's split over multiple lines
It works OK most of the time, so we put up with it.
Wilfred Hughes
1 Comment
Requiring all code to be autoformatted helps a great deal, but it doesn't cover all these cases.
Text wins so often. Generic text blame tools are versatile, lots of people use them, so they are often polished (within the limits of the data they work on).
I've been adding heuristics to difftastic for showing comment changes. See before and after.
It's a messy problem: do I split on spaces or word boundaries? Do I handle "reflowing" single-line comments where a word is added to a sentence and several comments change?
> try wrapping the expression in `summary::FileContent::Text`
This rust-analyzer feature amazed me. I'd changed an API from taking a &str to a Text(String) and it offered a quick fix to correct the call sites!