Ng Zhi An
461be74976
Realign virtual tabs when applying fix
...
Fix an off-by-one error, in the case that is commented `should never happen`.
It happens when the end of a range is the at the end of a line.
In that case we should update the real column count (probably just by +1)
instead of returning it.
I modified makeNonVirtual to use a helper, realign, that works on
Ranged. That way we can share the code to realign a PositionedComment
and also a Replacement.
Fixes #1420
2018-12-29 17:16:29 +08:00
Ng Zhi An
0636e7023c
Fix applying multiple fixes per line
...
Fixes #1421
2018-12-21 14:34:03 +08:00
Ng Zhi An
a8d88dfe98
Fix calculation of changed lines
2018-12-17 00:20:50 -08:00
Ng Zhi An
7d2c519d64
Remove spurious new line in fix message
2018-12-17 00:20:50 -08:00
Ng Zhi An
bc111141f8
Move fix application logic to separate module
2018-12-17 00:20:50 -08:00
Ng Zhi An
3471ad45b1
Smarter sorting and application of fix to handle multiple replacements
2018-12-17 00:20:50 -08:00
Ng Zhi An
d5ba41035b
Add method to apply a multi-line replacement
2018-12-16 21:53:48 -08:00
Vidar Holen
eb588f62f6
Enable autofix support. It's still preliminary.
2018-12-09 15:01:08 -08:00
Vidar Holen
a8376a09a9
Minor renaming and output fixes
2018-12-09 15:01:08 -08:00
Ng Zhi An
5ed89d2241
Change definition of Replacement, add ToJSON instance for it
2018-12-09 15:01:08 -08:00
Ng Zhi An
4a87d2a3de
Expose token positions in params, use that to construct fixes
2018-12-09 15:01:08 -08:00
Ng Zhi An
41613babd9
Prototype fix
2018-12-09 15:01:08 -08:00
Vidar Holen
66b5f13c6f
Make wiki links fit in 80 columns
2018-12-02 19:08:06 -08:00
Vidar Holen
e0e46e979a
Add wiki links to output, and a -W controlling it. ( Fixes #920 )
2018-10-10 21:53:43 -07:00
Vidar Holen
7138abff4b
Expose (some) span information in TTY output
2018-06-17 17:44:31 -07:00
Oleg Grenrus
cd7c077ecc
Move library into src/
2018-03-08 19:57:40 +02:00