| 1 | // Copyright 2023 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package unitcheckerscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/unitchecker`/ |
| 6 | |
| 7 | import ( |
| 8 | "go/tokenscip-go gomod github.com/golang/go/src go1.25.0 `go/token`/" |
| 9 | "go/typesscip-go gomod github.com/golang/go/src go1.25.0 `go/types`/" |
| 10 | ) |
| 11 | |
| 12 | // This file exposes various internal hooks to the separate_test. |
| 13 | // |
| 14 | // TODO(adonovan): expose a public API to unitchecker that doesn't |
| 15 | // rely on details of JSON .cfg files or enshrine I/O decisions or |
| 16 | // assumptions about how "go vet" locates things. Ideally the new Run |
| 17 | // function would accept an interface, and a Config file would be just |
| 18 | // one way--the go vet way--to implement it. |
| 19 | |
| 20 | func SetTypeImportExportscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/unitchecker`/SetTypeImportExport().( |
| 21 | MakeTypesImporter func(*Configscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/unitchecker`/Config#, *tokenscip-go gomod github.com/golang/go/src go1.25.0 `go/token`/.FileSetscip-go gomod github.com/golang/go/src go1.25.0 `go/token`/FileSet#) typesscip-go gomod github.com/golang/go/src go1.25.0 `go/types`/.Importerscip-go gomod github.com/golang/go/src go1.25.0 `go/types`/Importer#, |
| 22 | ExportTypes func(*Configscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/unitchecker`/Config#, *tokenscip-go gomod github.com/golang/go/src go1.25.0 `go/token`/.FileSetscip-go gomod github.com/golang/go/src go1.25.0 `go/token`/FileSet#, *typesscip-go gomod github.com/golang/go/src go1.25.0 `go/types`/.Packagescip-go gomod github.com/golang/go/src go1.25.0 `go/types`/Package#) error, |
| 23 | ) { |
| 24 | makeTypesImporterscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/unitchecker`/makeTypesImporter. = MakeTypesImporter |
| 25 | exportTypesscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/analysis/unitchecker`/exportTypes. = ExportTypes |
| 26 | } |