-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.go
27 lines (23 loc) · 1002 Bytes
/
project.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package repos
import (
"codexray/cxdig/core"
"codexray/cxdig/types"
)
// ProjectName identifies the project being analysed
type ProjectName string
func (p *ProjectName) String() string {
return string(*p)
}
// Repository interface is used to manipulate a source code repository versioned under a particular CVS
type Repository interface {
// Name returns the (short) name of the repository
Name() ProjectName
// GetAbsPath returns the absolute path to the repository root folder
GetAbsPath() string
// SampleWithCmd runs a sampling operation with the given tool and sampling list
SampleWithCmd(tool ExternalTool, rate SamplingRate, commits []types.CommitInfo, samples []types.SampleInfo, p core.Progress) error
// ExtractCommits extract information about all the commits in the repository
ExtractCommits() ([]types.CommitInfo, error)
// HasLocalModifications returns true if the repository has local modification (inclusind non versioned files)
HasLocalModifications() (bool, error)
}