CI / changes (push) Successful in 8s
CI / commitlint (push) Has been skipped
CI / openapi (push) Successful in 27s
CI / web (push) Successful in 36s
CI / go (push) Successful in 54s
CI / bird2 (push) Successful in 16s
CI / release (push) Successful in 3m46s
- Enhanced AGENTS.md to include post-editing commands for Go code, specifying the use of `gofmt -w`, `go vet ./...`, and `scripts/lint-go.ps1`. - Updated engineering rules in .cursor/rules/engineering.mdc to clarify the linting process and ensure consistency in Go code formatting. - Improved documentation for CI checks related to Go code style and linting.
20 lines
617 B
PowerShell
20 lines
617 B
PowerShell
# Same gates as CI job go (subset): gofmt, vet, golangci-lint.
|
|
$ErrorActionPreference = 'Stop'
|
|
Set-Location (Join-Path $PSScriptRoot '..')
|
|
|
|
$unfmt = gofmt -l . 2>$null
|
|
if ($unfmt) {
|
|
Write-Error "gofmt: unformatted files:`n$unfmt"
|
|
}
|
|
go vet ./...
|
|
$golangci = Get-Command golangci-lint -ErrorAction SilentlyContinue
|
|
if (-not $golangci) {
|
|
$golangciPath = Join-Path $env:USERPROFILE 'go\bin\golangci-lint.exe'
|
|
if (Test-Path $golangciPath) { $golangci = @{ Source = $golangciPath } }
|
|
}
|
|
if ($golangci) {
|
|
& $golangci.Source run
|
|
} else {
|
|
Write-Warning 'lint-go: golangci-lint not found, skipping (CI will run it)'
|
|
}
|