Org upkeep (.github#1): lint baseline, Go 1.27.1, tool pins, core v0.1.5, JSON logs off a terminal - #44
Merged
Conversation
Fix every finding: two unused-parameter func literals in openapi_test.go and one unexported-return (NewScatterGatherStore now returns SandboxStore).
Remove four directives nolintlint reports as unused: gosec no longer flags the three it targeted, and the misspell one duplicates the existing ignore-rules entry for creater.
Regenerate the CRD and docs/api.md; v0.3.0 now marks every optional
field's Validation column as "Optional: {}" instead of leaving it blank.
Both binaries now set UseJSON from a stderrIsTerminal check, so a pipe, a pod or a service gets structured records while a terminal keeps the console writer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the per-repo part of cocoonstack/.github#1: revive default rules, nolintlint, Go 1.27.1, the pinned tool versions, projecteru2/core v0.1.5 and JSON log records when stderr is not a terminal (only the sections that apply here).
Commits
Notes
unexported-return:NewScatterGatherStorereturnsSandboxStore. Every production caller already uses it through that interface; the tests that need internals assert to*scatterGatherStore.controller-gen.kubebuilder.io/versionannotation (no schema change, deepcopy unchanged). crd-ref-docs v0.3.0 rendersOptional: {}in the Validation column ofdocs/api.md.aslstill reports two advisoryforwarderfindings (pkg/envdproxy/dial.go:129 withTarget,pkg/envdproxy/envdproxy.go:143 sandboxHost). They exist on master already; the gating mode (-forwarder=false) is clean on both.JSON logs off a terminal
sandbox-envd-proxy: stderr to a file gives{"level":"info","func":"main.run",..."message":"starting sandbox-envd-proxy ..."}; underscript -qthe console line has ANSI colour codes.Gates
Run with
GOWORK=offagainst the pinned golangci-lint v2.13.2 (built with go1.27.1):gofumpt v0.12.0 / goimports v0.50.0 are held until the next golangci-lint release vendors them (see the issue).