Commit Graph

14 Commits

Author SHA1 Message Date
Vidar Holen f77a545282 Control Flow Graph / Data Flow Analysis support 2022-07-20 08:08:24 -07:00
Joseph C. Sible d45ab327b0 Only perform the comparisons once 2020-04-05 19:45:28 -04:00
Joseph C. Sible 8a005526cc Use drop instead of splitAt since we only use the second half 2020-02-01 23:04:04 -05:00
Joseph C. Sible e6e89d68fd Use list comprehensions instead of clunky combinations of map and filter 2020-02-01 23:04:04 -05:00
Vidar Holen fd2beaadfa Make Fixer responsible for realigning tab stops 2019-01-09 18:08:59 -08:00
Vidar Holen df7f00eaed Remove duplicate `pathTo` and unused `replaceMultiLines` 2019-01-09 17:51:43 -08:00
Vidar Holen 434b904746 Process replacements according to AST depth (fixes #1431) 2019-01-08 18:25:37 -08:00
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
Vidar Holen 9acc8fcb53 Fix semigroup incompatibility 2018-12-23 11:08:48 -08:00
Vidar Holen 897f019353 Move Ranged definition to Fixer to avoid overpromising 2018-12-22 10:04:00 -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 3403f8d75b Fix bug in overlap check 2018-12-17 00:20:50 -08:00
Ng Zhi An 408a3b99d8 Remove overlaps before applying replacements 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