Commit Graph

7703 Commits (52aaea4418193d91e84ad9cdf0a2e42eb298013f)
 

Author SHA1 Message Date
Wilfred Hughes 52aaea4418 Try checking output on GH actions 2022-02-20 20:28:37 +07:00
Wilfred Hughes 54fd04a7e2 Ensure regression test always uses the same width 2022-02-20 20:28:06 +07:00
Wilfred Hughes ca55c7ee2c Update integration test expectation following 7544874a5 2022-02-20 20:25:49 +07:00
Wilfred Hughes d8e8e12bf8 Roll version 2022-02-20 16:50:05 +07:00
Wilfred Hughes b0e835feb6 Document the release script 2022-02-20 16:48:58 +07:00
Wilfred Hughes c8378dd589 Clarify how many items in the path we're logging 2022-02-20 15:54:01 +07:00
Wilfred Hughes 157fbf23a9 Add environment variable for debugging side-by-side printing 2022-02-20 15:51:11 +07:00
Wilfred Hughes e4b2094860 Replace .next and .next_if_same_layer with .next_sibling
This is the case we want now, and it's a simpler API to reason about.
2022-02-20 14:41:23 +07:00
Wilfred Hughes e4021bd38a Disable regression test on CI 2022-02-20 13:16:22 +07:00
Wilfred Hughes e32ba0eb16 Improve edge names 2022-02-20 13:15:00 +07:00
Wilfred Hughes 33d4ac1162 Check regression test output 2022-02-20 13:09:29 +07:00
Wilfred Hughes cbef056a3f Fix build after removing field on Unchanged edges 2022-02-20 13:08:50 +07:00
Wilfred Hughes d3afd5d40a Run regression test in CI 2022-02-20 12:59:46 +07:00
Wilfred Hughes eea5bb7273 Remove unused import 2022-02-20 12:54:25 +07:00
Wilfred Hughes 7544874a55 Tracking depth difference is no longer necessary
Tracking parents is a better solution
2022-02-20 12:52:46 +07:00
Wilfred Hughes 82890923cd Track entering/leaving parents explicitly
This produces significantly better diffs, and fixes some cases that
were outright wrong before.

Fixes #30
2022-02-20 12:43:52 +07:00
Wilfred Hughes 692f08f1f1 Merge hunks when lines are adjacent 2022-02-19 16:12:04 +07:00
Wilfred Hughes 0973f65899 cargo fmt 2022-02-19 14:51:15 +07:00
Wilfred Hughes 63673c799b Increment i consistently before asserting it's non-zero 2022-02-19 11:04:19 +07:00
Wilfred Hughes 69941aecb4 Assert that neighbours() always returns non-empty results 2022-02-18 23:26:31 +07:00
Wilfred Hughes aedd103b56 Log more of initial path if DFT_VERBOSE is set 2022-02-18 17:09:06 +07:00
Wilfred Hughes c2cfd09863 Put manual first in readme buttons 2022-02-17 00:13:49 +07:00
Wilfred Hughes fe1b949cda Define a BackgroundColor::is_dark helper 2022-02-14 15:54:42 +07:00
Wilfred Hughes 395f6663e6 Usage notes on regression test script 2022-02-13 17:25:58 +07:00
Wilfred Hughes d8cc1168b1 Make sample files naming consistent so they're all used in regression test 2022-02-13 17:21:20 +07:00
Wilfred Hughes f4b0d2f584 Rename JS sample file 2022-02-13 17:18:39 +07:00
Wilfred Hughes 469fc6b470 Don't log difftastic compile time when comparing 2022-02-13 17:16:45 +07:00
Wilfred Hughes 7f150ce883 Ignore temporary file from comparison tool 2022-02-13 17:16:30 +07:00
Wilfred Hughes 66f41c7053 Add reference file for current output hashes 2022-02-13 17:15:41 +07:00
Wilfred Hughes 3986bae12e Helper script for regression testing on sample files 2022-02-13 17:06:11 +07:00
Wilfred Hughes 3c1c5649f4 Ensure --color is still respected
This was broken in the port to owo_colors. owo_colors does not have a
global override: the override function only affects if_supports_color.
2022-02-13 16:54:57 +07:00
Wilfred Hughes 714edd8f0c Fix crash on empty substrings 2022-02-13 16:27:00 +07:00
Wilfred Hughes 653ebc8ad3 Allow debug printing of ColorOutput 2022-02-13 16:03:40 +07:00
Wilfred Hughes 1ef8a35fc1 Move function to the file it's used in 2022-02-13 15:40:06 +07:00
Wilfred Hughes 2595dcb93f Optimise: use one iterator when slicing by codepoint 2022-02-13 15:35:50 +07:00
Wilfred Hughes 6004855206 Port to owo_colors
This library is faster and actively maintained.

Closes #107
2022-02-13 15:13:40 +07:00
Wilfred Hughes d8ad9bec41 cargo fmt 2022-02-13 15:12:19 +07:00
Wilfred Hughes 675f3f77d0 Add TODO 2022-02-13 14:29:43 +07:00
Wilfred Hughes c5d8aaf812 Improve usage instructions in hlp and for wrong number of arguments 2022-02-13 12:46:08 +07:00
Wilfred Hughes 84e5c3c700 Remove unnecessary lifetimes 2022-02-13 11:54:01 +07:00
Wilfred Hughes 043395a8c5 Add field docstrings for Hunk 2022-02-12 12:31:21 +07:00
Wilfred Hughes 84a2dc2dac Fix missing context on misaligned hunks
Fixes #134
2022-02-12 12:26:00 +07:00
Wilfred Hughes 92cf448081 Add a basic unit test for matched_lines_for_hunk 2022-02-12 12:08:06 +07:00
Wilfred Hughes ef5ae1ad8d Add files from #134 to sample file collection 2022-02-12 11:10:23 +07:00
Wilfred Hughes 46301dbfa5 Don't crash on zero arguments 2022-02-12 11:04:52 +07:00
Wilfred Hughes f2410bb600 Add TODO 2022-02-12 11:03:29 +07:00
Wilfred Hughes 4c391ea1c8 Don't repeatedly calculate the codepoint length when styling 2022-02-11 22:44:27 +07:00
Wilfred Hughes a829511c1a Write split_words as a loop without regular expressions
This function is hot on large textual diffs, taking 16% of total
runtime. This new implementation is several times faster.
2022-02-11 22:33:40 +07:00
Wilfred Hughes ab1071cfda Increase the default value of DFT_NODE_LIMIT
Closes #136
2022-02-11 21:54:24 +07:00
Wilfred Hughes 99269fcbdf Remove obsolete comments 2022-02-11 09:26:58 +07:00