feat: diff parser #33
No reviewers
Labels
No Label
bug
component
executor
component
framework
component
parser
component
UI
duplicate
enhancement
help wanted
invalid
priority
p0
priority
p1
priority
p2
priority
p3
question
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: JOJ/JOJ3#33
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "diff"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@zzjc123 You need to rebase the branch on master instead of healthcheck so that I can start reviewing the code.
The diff parser needs a character-by-character comparison algorithm so that we can choose whether to ignore whitespace or not as not all the problems requires the output format to be exactly the same.
You can check https://cs.opensource.google/go/x/tools/+/refs/tags/v0.1.12:internal/lsp/diff/myers/diff.go and https://github.com/cj1128/myers-diff/blob/master/main.go.
0af0994b8c
tod47e14612a
You mean we need to compare it by character but we still output like
Could you give me a demo output for handling whitespace, didn't get you clearly. Which kind of cases we may face due to whitespace?
For some cases, if the answer is
123 456 789
, we should also accept123 456 789
and1234 56 789
. The output comment is just for assistance, no need to make it precise. Just show them in which line characters are different is enough.Can we just pass an argument to ignore all whitespace? Or we cheat space tab as the same?
The argument should be in
when it is
conf.toml
,ignore_whitespace = true
. You can start by ignoring all\r
,\n
,\t
, andtrue
.Add tests in the example repo diff/basic diff/complex.
dae5247887
toac9547f1f1
all test cases passed
@bomingzh
f389aa7329
to2c742852fb
WIP: feat: diff parserto feat: diff parser