go/gopls/internal
Alan Donovan 60ddccae85 internal/diff: Apply: validate inputs
Apply now checks that its edits are valid
(not out of bounds or overlapping),
and reports an error if not.

It also sorts them, if necessary, using (start, end)
as the key, to ensure that insertions (end=start)
are ordered before deletions at the same point
(but without changing the relative order of insertions).

Two other implementations of the diff.Apply algorithm
have been eliminated. (One of them failed to sort edits,
requiring the protocol sender to do so; that burden
is now gone.)

Change-Id: Ia76e485e6869db4a165835c3312fd14bc7d43db2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/439278
Auto-Submit: Alan Donovan <adonovan@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Alan Donovan <adonovan@google.com>
2022-10-07 14:24:20 +00:00
..
coverage gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
govulncheck gopls/internal/govulncheck: sync x/vuln@62b0186 2022-09-02 15:10:33 +00:00
hooks internal/diff: Apply: validate inputs 2022-10-07 14:24:20 +00:00
lsp internal/diff: Apply: validate inputs 2022-10-07 14:24:20 +00:00
regtest gopls/internal/regtest/misc: delete testdata 2022-10-06 18:44:06 +00:00
vulncheck gopls/internal/vulncheck: use vulntest for test database creation 2022-10-05 23:17:51 +00:00
migrate.sh gopls/internal/migrate.sh: a script to migrate internal/lsp to gopls/ 2022-09-07 14:10:36 +00:00