go/gopls/internal/regtest/workspace
Robert Findley 3e0a5031e3 internal/lsp: use directoryFilters in import scanning
Based on dle8's CL 414454, wire in directoryFilters into the goimports
ModuleResolver scan. A few changes/fixes/additions from that CL:

- Fix a bug in filter validation that was causing -**/a not to validate.
- Fix a bug in regex building where -a was not treated as an excluded
  prefix (it was matching 'a' anywhere).
- Use absolute paths in the SkipPathInScan, so that we can evaluate
  directory filters relative to the workspace folder.
- Add several regression tests.
- Consolidate directoryFilters regression tests under a new
  directoryfilters_test.go file.
- Add several TODOs.

Fixes golang/go#46438

Change-Id: I55cd3d6410905216cc8cfbdf528f301d67c2bbac
Reviewed-on: https://go-review.googlesource.com/c/tools/+/420959
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dylan Le <dungtuanle@google.com>
2022-08-04 15:50:11 +00:00
..
broken_test.go internal/lsp/cache: allow network whenever reloading the workspace 2022-07-27 19:28:51 +00:00
directoryfilters_test.go internal/lsp: use directoryFilters in import scanning 2022-08-04 15:50:11 +00:00
metadata_test.go gopls/internal/regtest: add a test that ignoring a file resolves errors 2022-08-02 14:13:40 +00:00
workspace_test.go internal/lsp: use directoryFilters in import scanning 2022-08-04 15:50:11 +00:00