Apply module scope to file validation checks
This commit is contained in:
@@ -95,9 +95,10 @@ go.work.sum paths as `workspace-files`. Formatting failures are reported as
|
||||
`go-format` with affected paths and preserve parser or source-inspection causes.
|
||||
|
||||
When `validation.module_distribution.local_replacements` is true, the command
|
||||
parses committed `go.mod` declarations, including nested and vendor modules,
|
||||
after workspace-file inspection. Filesystem replacements use the
|
||||
`local-replacements` identity and include the declaration path, source line,
|
||||
parses committed `go.mod` declarations in the selected module after
|
||||
workspace-file inspection. Vendored contents remain in scope, while
|
||||
independently released nested modules are excluded. Filesystem replacements use
|
||||
the `local-replacements` identity and include the declaration path, source line,
|
||||
and target; versioned replacements are permitted. Committed module symlinks are
|
||||
resolved within the candidate, regardless of `GOWORK`.
|
||||
When `validation.file_size` is a non-null object, the command checks each
|
||||
|
||||
@@ -69,12 +69,13 @@ Anchors keep Unicode letters and numbers, underscores, and hyphens; spaces
|
||||
become hyphens, and repeated headings receive numeric suffixes.
|
||||
|
||||
When `validation.module_distribution.workspace_files` is true, it reports
|
||||
committed blob entries whose basename is `go.work` or `go.work.sum`, including
|
||||
nested paths and symlinks. It checks candidate distribution contents regardless
|
||||
committed `go.work` and `go.work.sum` files in the selected module inputs,
|
||||
including nested paths and symlinks. It checks the captured candidate regardless
|
||||
of `GOWORK`; it does not select or change the workspace used by Go commands,
|
||||
and it does not alter existing vendor behavior. Omitted or false disables it.
|
||||
When `validation.module_distribution.local_replacements` is true, it parses all
|
||||
committed `go.mod` declarations, including vendor and nested modules, and reports
|
||||
and vendored contents remain in scope. Omitted or false disables it. When
|
||||
`validation.module_distribution.local_replacements` is true, it parses the
|
||||
selected module's committed `go.mod` declarations. Vendored contents remain in
|
||||
scope, while independently released nested modules are excluded. It reports
|
||||
`replace` directives whose replacement has no version. These filesystem
|
||||
replacements include relative and absolute paths; versioned module replacements
|
||||
are permitted. Committed `go.mod` symlinks are resolved within the candidate,
|
||||
@@ -109,8 +110,8 @@ check; `{}` enables it with a default of 1,000,000 bytes. A missing or null
|
||||
`limit_bytes` selects that default, zero is a valid limit, and negative limits
|
||||
are invalid.
|
||||
|
||||
`validation.file_size.exclusions` contains literal repository-relative file or
|
||||
directory paths. Directory exclusions include committed descendants, using path
|
||||
`validation.file_size.exclusions` contains literal paths relative to the
|
||||
selected module. Directory exclusions include committed descendants, using path
|
||||
boundaries (`assets` does not exclude `assets-old`). Ordinary relative path
|
||||
normalization applies; metacharacters are literal and unmatched paths have no
|
||||
effect. The check measures regular and symlink blobs, including small binaries;
|
||||
|
||||
@@ -43,22 +43,24 @@ ignores symlink blobs and worktree changes, and reports unformatted paths as
|
||||
after tests, selected vet, and package compilation, before `AdditionalChecks`.
|
||||
|
||||
Set `Validation.ModuleDistribution.WorkspaceFiles` to reject committed
|
||||
`go.work` and `go.work.sum` blobs, including nested and symlink entries. It
|
||||
examines the captured candidate even when `GOWORK=off`, ignores uncommitted
|
||||
files, and does not change Go test workspace selection or vendor behavior. The
|
||||
zero value disables the check; failures use `workspace-files`.
|
||||
`go.work` and `go.work.sum` files in the selected module inputs, including
|
||||
nested and symlink entries. It examines the captured candidate even when
|
||||
`GOWORK=off`, ignores uncommitted files, and does not change Go test workspace
|
||||
selection; vendored contents remain in scope. The zero value disables the check;
|
||||
failures use `workspace-files`.
|
||||
Set `Validation.ModuleDistribution.LocalReplacements` independently to parse
|
||||
committed `go.mod` declarations throughout the candidate, including nested and
|
||||
vendor modules. It reports filesystem `replace` directives with their source
|
||||
path, line, and target as `local-replacements`; versioned replacements are
|
||||
the selected module's committed `go.mod` declarations. Vendored contents remain
|
||||
in scope, while independently released nested modules are excluded. It reports
|
||||
filesystem `replace` directives with their source path, line, and target as
|
||||
`local-replacements`; versioned replacements are
|
||||
permitted. Committed module symlinks are resolved within the candidate. Parse
|
||||
and inspection errors retain their causes, and the rule applies even when
|
||||
`GOWORK=off`. Its zero value disables the check.
|
||||
Set `Validation.FileSize` to check each committed blob against a byte limit.
|
||||
Nil disables the check; an empty object enables the default of 1,000,000
|
||||
decimal bytes. `LimitBytes` is strict greater-than, accepts zero, and rejects
|
||||
negative values. `Exclusions` contains literal repository-relative files or
|
||||
directories; excluded directories include descendants. Symlink blobs are
|
||||
negative values. `Exclusions` contains literal files or directories relative to
|
||||
the selected module; excluded directories include descendants. Symlink blobs are
|
||||
measured by link-text bytes, and gitlinks are omitted. The check applies to the
|
||||
captured candidate and reports one oversized file with its measurement as
|
||||
`file-size`; it does not measure historical or aggregate size.
|
||||
|
||||
@@ -62,9 +62,10 @@ are ignored, and Go workspace selection and vendor behavior are unchanged. Its
|
||||
zero value disables the check. Findings use `workspace-files` and stop
|
||||
publication before product checks or tag creation.
|
||||
Set `Validation.ModuleDistribution.LocalReplacements` independently to parse
|
||||
committed `go.mod` declarations across the candidate, including nested and
|
||||
vendor modules. Filesystem `replace` directives are reported with their source
|
||||
path, line, and target as `local-replacements`; versioned replacements are
|
||||
selected module's committed `go.mod` declarations. Vendored contents remain in
|
||||
scope, while independently released nested modules are excluded. Filesystem
|
||||
`replace` directives are reported with their source path, line, and target as
|
||||
`local-replacements`; versioned replacements are
|
||||
permitted. Committed module symlinks are resolved within the candidate, and
|
||||
parse or inspection errors retain their causes. This check is independent of
|
||||
`GOWORK`; its zero value disables it, and a failure stops publication before
|
||||
@@ -72,9 +73,9 @@ product checks or tag creation.
|
||||
Set `Validation.FileSize` to check each committed blob against a byte limit.
|
||||
Nil disables the check; an empty object enables the default of 1,000,000
|
||||
decimal bytes. `LimitBytes` uses strict greater-than, accepts zero, and rejects
|
||||
negative values. `Exclusions` contains literal repository-relative files or
|
||||
directories, including committed descendants of excluded directories. Symlink
|
||||
blob size is its link text; gitlinks are omitted. This check measures only the
|
||||
negative values. `Exclusions` contains literal files or directories relative to
|
||||
the selected module, including committed descendants of excluded directories.
|
||||
Symlink blob size is its link text; gitlinks are omitted. This check measures only the
|
||||
captured candidate and reports one oversized file with its measurement as
|
||||
`file-size`; it stops publication before product checks or tag creation.
|
||||
|
||||
|
||||
@@ -332,6 +332,15 @@ at different paths keep distinct relative-link findings. Confirm selection
|
||||
errors with content checks disabled and preserve cancellation/cleanup regressions.
|
||||
Run affected validation and facade tests.
|
||||
|
||||
**Completed:** Formatting, workspace, local-replacement, file-size, and Markdown
|
||||
checks now iterate the selected committed inputs. Targeted reads still resolve
|
||||
against the full repository tree. File-size exclusions are translated from the
|
||||
selected module to repository-relative paths, and shared-file failures preserve
|
||||
their public check, path, and cause. Updated file-size guidance and verified
|
||||
in-scope and out-of-scope findings, shared inputs, cross-module anchors, reader
|
||||
cleanup, facade conversion, `go test ./internal/validation .`, and
|
||||
`go run ./internal/apicheck`.
|
||||
|
||||
## Stage 6: Execute Go validation in the module with reusable local settings
|
||||
|
||||
**Outcome:** One selected standard suite runs in the module, and later composite
|
||||
|
||||
Reference in New Issue
Block a user