go/gopls/internal/hooks
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
..
analysis.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
analysis_117.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
diff.go internal/diff: Apply: validate inputs 2022-10-07 14:24:20 +00:00
diff_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
gen-licenses.sh all: replace deprecated egrep with grep -E 2022-09-23 13:31:09 +00:00
hooks.go internal/diff: abolish errors 2022-10-05 20:30:46 +00:00
licenses.go gopls/internal/hooks: improve license file test 2021-01-26 00:28:59 +00:00
licenses_test.go gopls: upgrade staticcheck to v0.3.0 2022-04-07 14:59:24 +00:00