Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultExclusions() []string
- func DefaultExclusionsFingerprint() []string
- func Excluded(exclusions []string, path string) bool
- func Exclusions() []string
- type CompiledFormat
- type Finder
- func (finder *Finder) GetConfigPath(rootPath string, exclusions []string) string
- func (finder *Finder) GetGroups(rootPath string, exclusions []string, lockfileOnly bool, strictness int) (Groups, error)
- func (finder *Finder) GetSupportedFormats() ([]*CompiledFormat, error)
- func (finder *Finder) GetSupportedFormatsFallbackJson() ([]byte, error)
- func (finder *Finder) GetSupportedFormatsJson() ([]byte, error)
- type Format
- type Group
- type Groups
- type IFinder
Constants ¶
View Source
const ( StrictAll = 0 StrictLockAndPairs = 1 StrictPairs = 2 )
View Source
const SupportedFormatsFallbackFilePath = "embedded/supported_formats.json"
View Source
const SupportedFormatsUri = "/api/1.0/open/files/supported-formats"
Variables ¶
View Source
var EXCLUDED_DIRS_FINGERPRINT = []string{
"nbproject", "nbbuild", "nbdist", "node_modules",
"__pycache__", "_yardoc", "eggs",
"wheels", "htmlcov", "__pypackages__", ".git"}
View Source
var EXCLUDED_DIRS_FINGERPRINT_RAW = []string{"**/*.egg-info/**", "**/*venv/**", "**/*venv3/**"}
Functions ¶
func DefaultExclusions ¶
func DefaultExclusions() []string
func DefaultExclusionsFingerprint ¶ added in v1.2.4
func DefaultExclusionsFingerprint() []string
func Exclusions ¶ added in v1.2.5
func Exclusions() []string
Types ¶
type CompiledFormat ¶
type CompiledFormat struct { ManifestFileRegex *regexp.Regexp DocumentationUrl *string LockFileRegexes []*regexp.Regexp // contains filtered or unexported fields }
func NewCompiledFormat ¶
func NewCompiledFormat(format *Format) (*CompiledFormat, error)
func (*CompiledFormat) MatchFile ¶
func (format *CompiledFormat) MatchFile(filename string) bool
func (*CompiledFormat) MatchLockFile ¶
func (format *CompiledFormat) MatchLockFile(filename string) bool
type Finder ¶
type Finder struct {
// contains filtered or unexported fields
}
func NewFinder ¶
func NewFinder(c client.IDebClient, fs ioFs.IFileSystem) (*Finder, error)
func (*Finder) GetConfigPath ¶ added in v1.8.15
func (*Finder) GetGroups ¶
func (finder *Finder) GetGroups(rootPath string, exclusions []string, lockfileOnly bool, strictness int) (Groups, error)
GetGroups return all file groups in specified path recursively.
func (*Finder) GetSupportedFormats ¶
func (finder *Finder) GetSupportedFormats() ([]*CompiledFormat, error)
GetSupportedFormats returns all supported dependency file formats
func (*Finder) GetSupportedFormatsFallbackJson ¶ added in v1.5.0
func (*Finder) GetSupportedFormatsJson ¶ added in v1.5.0
type Group ¶
type Group struct { ManifestFile string `json:"manifestFile"` CompiledFormat *CompiledFormat `json:"-"` LockFiles []string `json:"lockFiles"` }
func NewGroup ¶
func NewGroup(manifestFile string, format *CompiledFormat, lockFiles []string) *Group
func (*Group) GetAllFiles ¶
func (*Group) HasLockFiles ¶
Click to show internal directories.
Click to hide internal directories.