Documentation ¶
Overview ¶
Package validation contains logic for verifing the contents of a kzip. For now we consider a set of kzip files "valid" if they contain files covering all of a given source repo.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coverage ¶
type Coverage struct { // The missing paths. Paths []Dir }
Coverage describes the missing subdirectories in a repo.
func (*Coverage) Len ¶
Len reports the number of repo paths missing in the kzip archives. Len is part of sort.Interface.
type Dir ¶
type Dir struct { // Path is a subdirectory from Repo root. Path string // Missing is the number of files in the Repo from the corresponding // subdirectory that were missing from the KZIP. Missing int }
Dir describes a single missing subdirectory and how much is missing.
type Result ¶
type Result struct { // Number of files in the kzip archives matching one of Langs extensions. NumArchiveFiles int // Number of files in the repo matching one of Langs extensions. NumRepoFiles int // Number of files in the repo that were not matched in the kzip. NumMissing int // A breakdown of subdirectories with the most missing files. TopMissing Coverage // Statistics on the count of archive source files by corpus and extension. Stats Statistics }
Result explains a validation outcome.
type Settings ¶
type Settings struct { // Path to the kzip files to validate. Compilations []string // Path to the root of the repo to compare the kzip against. Repo string // Language extensions to check, e.g. java, cpp, h. Langs stringset.Set // Optional file to output missing paths to. MissingOutput string }
Settings encapsulates data for validation of a single kzip and repo.
type Statistics ¶ added in v0.0.31
Statistics collects file count stats on the contents of an archive per corpus, a map from corpus to file extension to count.