Check committed Go formatting
This commit is contained in:
@@ -39,16 +39,25 @@ This source compatibility check does not name or produce binaries, run a target
|
||||
executable, or create an artifact manifest. Omitted or empty `compile_targets`
|
||||
selects no package-compilation pass. When `full_vet` is omitted or false, the
|
||||
test command keeps its existing vet behavior. These settings are independent.
|
||||
`validation.go_format` checks regular committed Go blobs with the Go formatter
|
||||
used to build ReleaseKit. It includes vendor and nested-module source, ignores
|
||||
symlink blobs and the worktree, and reports every selected path whose bytes
|
||||
change under formatting. It never writes formatted bytes back. Omitted or false
|
||||
disables the check. It runs after tests, selected full vet, and selected package
|
||||
compilation, before configured product checks.
|
||||
For example:
|
||||
|
||||
```json
|
||||
{
|
||||
"product": "Example",
|
||||
"validation": {"go": {
|
||||
"race": true,
|
||||
"full_vet": true,
|
||||
"compile_targets": ["linux/amd64", "linux/arm64"]
|
||||
}}
|
||||
"validation": {
|
||||
"go": {
|
||||
"race": true,
|
||||
"full_vet": true,
|
||||
"compile_targets": ["linux/amd64", "linux/arm64"]
|
||||
},
|
||||
"go_format": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -73,7 +82,9 @@ access disabled, adding `-race` when `validation.go.race` is true. When
|
||||
run native `go vet -mod=readonly ./...` after successful tests. They then run
|
||||
`go build -mod=readonly -o <os.DevNull> ./...` in static mode for each
|
||||
`validation.go.compile_targets` entry, in profile order. Compile failures use
|
||||
the `package-compile` identity and include the selected target. Configured
|
||||
the `package-compile` identity and include the selected target. When selected,
|
||||
`validation.go_format` checks regular committed Go source with go/format after
|
||||
package compilation; unformatted paths use the `go-format` identity. Configured
|
||||
`checks` commands run afterward, once each in order, as additional product
|
||||
checks. Artifact builds selected by the separate `build` setting run after
|
||||
shared validation and product checks.
|
||||
|
||||
Reference in New Issue
Block a user