Skip to content

chore: CI on GitHub Actions, Go 1.21 minimum, lint and repository files - #74

Merged
kolkov merged 4 commits into
masterfrom
chore/repo-standard
Oct 27, 2026
Merged

kolkov merged 4 commits into
masterfrom
chore/repo-standard

Conversation

@kolkov

@kolkov kolkov commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Brings the repository to the same standard as ozzo-validation, ahead of v2.5.0.

  • Go 1.21 minimum (was 1.13): needed by the jwt/v5 and io/fs changes planned for v2.5.0, and the oldest Go CI tests. testify v1.4.0 → v1.12.1.
  • CI on GitHub Actions instead of Travis: race tests on Linux (oldstable, stable), Windows and macOS (stable) and on the minimum Go from go.mod, a linux/386 build, golangci-lint v2.15.0, gofmt and go mod tidy checks, govulncheck (informational), coverage on Codecov. One gate job named Test is the check to require in the ruleset.
  • golangci-lint config and fixes for its findings, without behaviour changes.
  • Repository files: SECURITY.md, CONTRIBUTING.md, CODEOWNERS, Dependabot for GitHub Actions, .gitattributes (LF endings, the file server tests compare served bytes), .gitignore, README badges and links to the /v2 packages, CHANGELOG [Unreleased].

govulncheck will report GO-2025-3553 in golang-jwt v3 until the jwt/v5 change lands; that job is not part of the gate.

jwt/v5 and io/fs, both planned for v2.5.0, need a newer Go than 1.13; 1.21
is the ecosystem minimum and the oldest Go the CI added next tests.
testify v1.4.0 -> v1.12.1, the version ozzo-validation uses.
The linter set and settings of ozzo-validation. Its repository-specific
exclusions and gocritic disabled-checks that the linter reports as
redundant are dropped; added are exclusions for the exported MIME_*
constants (renaming breaks importers) and for the route tree lookup in
store.go (hot path, splitting it is a performance change of its own).

Fixes without behaviour changes: explicit ignores for ParseMultipartForm
(as net/http's FormValue does) and for writing an error body after the
status is sent, time.Since, strings.ReplaceAll, reflect.Pointer and
PointerTo (Go 1.18), a type switch with assignment, preallocated slices,
and blank lines. Read-only file Close and the configured os.Open in
file.Content get nolint comments with the reason.
Tests with the race detector on Linux (oldstable, stable), Windows and
macOS (stable) and on the minimum Go read from go.mod, a linux/386 build,
golangci-lint v2.15.0, gofmt and go mod tidy checks, govulncheck
(informational) and Codecov coverage via OIDC. A single gate job named
Test is the check the ruleset requires. Dependabot keeps the actions
current.

README: CI and pkg.go.dev badges, package links to the /v2 module, Go 1.21
as the requirement.
SECURITY.md (private advisories, supported versions, deployment notes),
CONTRIBUTING.md, CODEOWNERS, .gitattributes keeping LF endings (the file
server tests compare served bytes), .gitignore for build outputs and
private directories, and the CHANGELOG entries for these changes.
@kolkov
kolkov merged commit 390cc2a into master Oct 27, 2026
11 of 12 checks passed
@kolkov
kolkov deleted the chore/repo-standard branch October 27, 2026 13:24
@kolkov kolkov mentioned this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant