Commit Graph

22 Commits

Author SHA1 Message Date
Joseph C. Sible 64c31d9142 Use fromRight instead of reimplementing it 2020-04-05 22:23:22 -04:00
Vidar Holen b1aeee564c Add a Diff output format 2019-06-23 20:02:01 -07:00
Virgil ea05271fa3 📝 Update Copyright to year 2019 and Markdown linting
- [x] 📝 Update Copyright to year 2019

- [x] 📝 MD009/no-trailing-spaces: Trailing spaces [Expected: 0 or 2; Actual: 1]
- [x] 📝 MD034/no-bare-urls: Bare URL used

- [ ] 📝 ~MD004/ul-style: Unordered list style [Expected: dash; Actual: asterisk]~
- [ ] ~add missing TOC entries~
2019-05-14 20:12:34 +10:00
Vidar Holen 9652ccfdbd Add a verbose mode: `-S verbose` 2019-04-13 13:16:41 -07:00
Vidar Holen fd2beaadfa Make Fixer responsible for realigning tab stops 2019-01-09 18:08:59 -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
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