Documentation
¶
Index ¶
- func BuildScalaIndices(scalaFiles []string, contentReader vcs.ContentReader) (map[string][]string, map[string]map[string][]string, map[string]string)
- func ExtractTypeIdentifiers(sourceCode []byte) []string
- func IsPackageObject(sourceCode []byte) bool
- func IsTestFile(filePath string) bool
- func ParsePackageDeclaration(sourceCode []byte) string
- func ParseTopLevelTypeNames(sourceCode []byte) []string
- func ResolveScalaProjectImports(absPath string, _ string, scalaPackageIndex map[string][]string, ...) ([]string, error)
- type ExternalImport
- type InternalImport
- type Module
- type ScalaImport
- type StandardLibraryImport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildScalaIndices ¶
func BuildScalaIndices( scalaFiles []string, contentReader vcs.ContentReader, ) (map[string][]string, map[string]map[string][]string, map[string]string)
BuildScalaIndices builds package and type indices for supplied Scala files.
func ExtractTypeIdentifiers ¶
ExtractTypeIdentifiers returns referenced type-like identifiers in Scala source.
func IsPackageObject ¶
IsPackageObject reports whether this source declares a Scala package object.
func IsTestFile ¶
IsTestFile reports whether the given Scala file path is a test file.
func ParsePackageDeclaration ¶
ParsePackageDeclaration extracts the Scala package from source code.
func ParseTopLevelTypeNames ¶
ParseTopLevelTypeNames extracts declared top-level type names from Scala source code.
func ResolveScalaProjectImports ¶
func ResolveScalaProjectImports( absPath string, _ string, scalaPackageIndex map[string][]string, scalaPackageTypes map[string]map[string][]string, scalaFilePackages map[string]string, suppliedFiles map[string]bool, contentReader vcs.ContentReader, ) ([]string, error)
ResolveScalaProjectImports resolves Scala project imports for a single file.
Types ¶
type ExternalImport ¶
type ExternalImport struct {
// contains filtered or unexported fields
}
ExternalImport represents a third-party import.
func (ExternalImport) IsWildcard ¶
func (e ExternalImport) IsWildcard() bool
func (ExternalImport) Package ¶
func (e ExternalImport) Package() string
func (ExternalImport) Path ¶
func (e ExternalImport) Path() string
type InternalImport ¶
type InternalImport struct {
// contains filtered or unexported fields
}
InternalImport represents an internal project import.
func (InternalImport) IsWildcard ¶
func (i InternalImport) IsWildcard() bool
func (InternalImport) Package ¶
func (i InternalImport) Package() string
func (InternalImport) Path ¶
func (i InternalImport) Path() string
type Module ¶
type Module struct{}
func (Module) Extensions ¶
func (Module) IsTestFile ¶
func (Module) IsTestFile(filePath string, _ vcs.ContentReader) bool
func (Module) Maturity ¶
func (Module) Maturity() moduleapi.MaturityLevel
func (Module) NewResolver ¶
type ScalaImport ¶
ScalaImport represents an import in Scala source code.
func ParseScalaImports ¶
func ParseScalaImports(sourceCode []byte, projectPackages map[string]bool) []ScalaImport
ParseScalaImports parses Scala source code and classifies imports.
type StandardLibraryImport ¶
type StandardLibraryImport struct {
// contains filtered or unexported fields
}
StandardLibraryImport represents a Scala/JDK standard library import.
func (StandardLibraryImport) IsWildcard ¶
func (s StandardLibraryImport) IsWildcard() bool
func (StandardLibraryImport) Package ¶
func (s StandardLibraryImport) Package() string
func (StandardLibraryImport) Path ¶
func (s StandardLibraryImport) Path() string