Rename the candidate file validator to forbidden files
This commit is contained in:
10
check.go
10
check.go
@@ -59,7 +59,7 @@ type ReleaseRequest struct {
|
||||
// module and shared-file inputs. Independent nested modules form automatic
|
||||
// input boundaries; vendored files remain included. Referenced destinations
|
||||
// remain available for targeted inspection without expanding the input set.
|
||||
// UntrackedFiles checks explicitly selected repository paths independently of
|
||||
// ForbiddenFiles checks explicitly selected repository paths independently of
|
||||
// those file inputs.
|
||||
type ValidationSpec struct {
|
||||
// SharedFiles adds repository-relative committed files to optional file
|
||||
@@ -68,10 +68,10 @@ type ValidationSpec struct {
|
||||
// Explicit files replace the defaults and must exist even when file checks
|
||||
// are off.
|
||||
SharedFiles []string
|
||||
// UntrackedFiles lists literal repository-relative file paths that must be
|
||||
// ForbiddenFiles lists literal repository-relative file paths that must be
|
||||
// absent from the captured commit, independently of module/shared inputs.
|
||||
// An empty list disables the check. File contents and history are not read.
|
||||
UntrackedFiles []string
|
||||
ForbiddenFiles []string
|
||||
Go GoValidationSpec
|
||||
// GoFormat checks the formatting of committed regular Go source files. It
|
||||
// does not modify repository contents and is disabled when false.
|
||||
@@ -143,7 +143,7 @@ type GoValidationSpec struct {
|
||||
// of test-time vet, and Validation.Go.CompileTargets compiles all packages for
|
||||
// each selected GOOS/GOARCH pair after tests and vet with cgo disabled. Package
|
||||
// compilation produces no artifacts and does not execute target binaries.
|
||||
// Validation.UntrackedFiles checks that selected repository-relative files are
|
||||
// Validation.ForbiddenFiles checks that selected repository-relative files are
|
||||
// absent from the captured commit after Go checks and before other file checks.
|
||||
// Validation.GoFormat checks regular committed Go source after those selected
|
||||
// Go checks and before AdditionalChecks. Its zero value disables formatting.
|
||||
@@ -197,7 +197,7 @@ func candidateRequest(request ReleaseRequest) candidate.Request {
|
||||
FullVet: request.Validation.Go.FullVet,
|
||||
CompileTargets: make([]validation.Target, len(request.Validation.Go.CompileTargets)),
|
||||
SharedFiles: copyStringSlice(request.Validation.SharedFiles),
|
||||
UntrackedFiles: copyStringSlice(request.Validation.UntrackedFiles),
|
||||
ForbiddenFiles: copyStringSlice(request.Validation.ForbiddenFiles),
|
||||
GoFormat: request.Validation.GoFormat,
|
||||
Markdown: internalMarkdownSettings(request.Validation.Markdown),
|
||||
ModuleDistribution: validation.ModuleDistributionSettings{
|
||||
|
||||
Reference in New Issue
Block a user