FIX: do not allow *start > end* in error make spans#8570
Conversation
sholderbach
left a comment
There was a problem hiding this comment.
Wow that is a good one! Thanks. still traumatized from span errors....
|
i just have these failures with i've tried merging into latest |
do not ask me how i come to this crash, i have no idea myself 😆
my pleasure 😌
i love them and i want them as pretty and reliable as possible 😏 |
This commit should make the CI typo check happy.
|
i learn how to spell words in d501451 👀 |
|
ok that is unfortunate 😬 |
error make spans
| Some(ShellError::GenericError( | ||
| "invalid error format.".into(), | ||
| "`$.label.start` is stricly bigger than `$.label.end`".into(), | ||
| "`$.label.start` is strictly bigger than `$.label.end`".into(), |
There was a problem hiding this comment.
I would rephrase it in terms of how it shold be but that is a stylistic choice
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8570 +/- ##
==========================================
+ Coverage 68.14% 68.51% +0.37%
==========================================
Files 624 624
Lines 100678 100681 +3
==========================================
+ Hits 68606 68985 +379
+ Misses 32072 31696 -376
|
|
@amtoine if you can fix the type-o, we can probably land this. Thanks! |
|
Merci beaucoup! |
avec plaisir! |
This should close #8567.
Description
this PR throws an error when
start > endin the most complete branch ofErrorMake::run, i.e. when$.msg,$.label.text,$.label.startand$.label.endare defined.i've also added a
error_start_bigger_than_end_should_failtest to check that it does indeed return the right error.User-Facing Changes
no more crash when manipulating span bounds and a clear error, e.g.
or
Tests + Formatting
toolkit fmttoolkit clippytoolkit testAfter Submitting