Documentation ¶
Index ¶
- func FileIsAutoGenerated(contents []byte) bool
- func ParseGitignoreFromDir(path string) (gitignore.IgnoreMatcher, error)
- type File
- type FileInfo
- type FilenameFilter
- func (filter *FilenameFilter) EnableGitignore()
- func (filter *FilenameFilter) GitignoreIsEnabled() bool
- func (filter *FilenameFilter) GitignorePop(path string)
- func (filter *FilenameFilter) GitignorePush(path string, matcher gitignore.IgnoreMatcher)
- func (filter *FilenameFilter) IgnoreDir(path string) bool
- func (filter *FilenameFilter) IgnoreFile(path string) bool
- func (filter *FilenameFilter) InitialGitignorePush(path string, matcher gitignore.IgnoreMatcher)
- type ReadCallback
- func ReadChangesFromWorkTree(dir string, changes []git.Change, phpExtensions []string) ReadCallback
- func ReadFilenames(filenames []string, filter *FilenameFilter, phpExtensions []string) ReadCallback
- func ReadFilesFromGit(repo, commitSHA1 string, ignoreRegex *regexp.Regexp, phpExtensions []string) ReadCallback
- func ReadFilesFromGitWithChanges(repo, commitSHA1 string, changes []git.Change, phpExtensions []string) ReadCallback
- func ReadOldFilesFromGit(repo, commitSHA1 string, changes []git.Change, phpExtensions []string) ReadCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileIsAutoGenerated ¶
func ParseGitignoreFromDir ¶
ParseGitignoreFromDir tries to parse a gitignore file at path/.gitignore. If no such file exists, <nil, nil> is returned.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File is a structure for storing information about a file at the stage of indexing and analysis.
Note: It is guaranteed that each field has a value.
func (*File) AutoGenerated ¶
func (*File) LinePosition ¶
func (*File) NumLinesPosition ¶
type FileInfo ¶
FileInfo is a structure for storing information about a file during file system traversal.
Note: Contents do not always contain data.
type FilenameFilter ¶
type FilenameFilter struct {
// contains filtered or unexported fields
}
func NewFilenameFilter ¶
func NewFilenameFilter(exclude *regexp.Regexp) *FilenameFilter
func (*FilenameFilter) EnableGitignore ¶
func (filter *FilenameFilter) EnableGitignore()
func (*FilenameFilter) GitignoreIsEnabled ¶
func (filter *FilenameFilter) GitignoreIsEnabled() bool
func (*FilenameFilter) GitignorePop ¶
func (filter *FilenameFilter) GitignorePop(path string)
func (*FilenameFilter) GitignorePush ¶
func (filter *FilenameFilter) GitignorePush(path string, matcher gitignore.IgnoreMatcher)
func (*FilenameFilter) IgnoreDir ¶
func (filter *FilenameFilter) IgnoreDir(path string) bool
func (*FilenameFilter) IgnoreFile ¶
func (filter *FilenameFilter) IgnoreFile(path string) bool
func (*FilenameFilter) InitialGitignorePush ¶
func (filter *FilenameFilter) InitialGitignorePush(path string, matcher gitignore.IgnoreMatcher)
type ReadCallback ¶
type ReadCallback func(ch chan FileInfo)
func ReadChangesFromWorkTree ¶
func ReadChangesFromWorkTree(dir string, changes []git.Change, phpExtensions []string) ReadCallback
ReadChangesFromWorkTree returns callback that reads files from workTree dir that are changed
func ReadFilenames ¶
func ReadFilenames(filenames []string, filter *FilenameFilter, phpExtensions []string) ReadCallback
ReadFilenames returns callback that reads filenames into channel
func ReadFilesFromGit ¶
func ReadFilesFromGit(repo, commitSHA1 string, ignoreRegex *regexp.Regexp, phpExtensions []string) ReadCallback
ReadFilesFromGit parses file contents in the specified commit
func ReadFilesFromGitWithChanges ¶
func ReadFilesFromGitWithChanges(repo, commitSHA1 string, changes []git.Change, phpExtensions []string) ReadCallback
ReadFilesFromGitWithChanges parses file contents in the specified commit, but only specified ranges
func ReadOldFilesFromGit ¶
func ReadOldFilesFromGit(repo, commitSHA1 string, changes []git.Change, phpExtensions []string) ReadCallback
ReadOldFilesFromGit parses file contents in the specified commit, the old version