Repository navigation
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
make lint on main reported 7 findings with golangci-lint 2.14.0 -- really 10: the default max-same-issues=3 hid two more unchecked Fprintln calls in the same table renderer, and one more in cmd/app.go. - pkg/output/printer.go: fmt.Fprintln(os.Stdout, ...) -> fmt.Println(...), the idiom the rest of the file already uses (identical output). De Morgan the ANSI-terminator scan; boundary tests pin both ends of both letter ranges and the adjacent non-letters. - cmd/app.go (tabwriter, errors surface at Flush) and cmd/gendocs.go: `_, _ =` as cmd/available.go and pkg/progress already do. - cmd/root.go: tagged switch on arg. CI: new Lint job runs `make lint` (so whatever golangci config the repo has is the one that gates; none today, i.e. defaults) with golangci-lint pinned to 2.14.0 and the tarball verified against a pinned SHA256, matching spawn's gitleaks install. A hygiene test keeps the step, the pin and the hash check from being dropped. `make lint` warns on a local version mismatch. Fixes #192
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.
Fixes #192
What
max-same-issues: 3hid two more uncheckedFprintlncalls in the table renderer and one incmd/app.go.--max-same-issues=0 --max-issues-per-linter=0now reports 0.pkg/output/printer.go:fmt.Fprintln(os.Stdout, …)→fmt.Println(…), the idiom the rest of the file uses (byte-identical output). The ANSI-terminator scan is De Morgan'd (QF1001).cmd/app.go(tabwriter: write errors show up atFlush, which is already returned) andcmd/gendocs.go:_, _ =, as incmd/available.goandpkg/progress.cmd/root.go: tagged switch (QF1002).make lint, so CI uses the same golangci config contributors use. There isn't one today, so built-in defaults apply. A root.golangci.ymlwould be picked up automatically. golangci-lint is pinned to 2.14.0, and its tarball is checked against a SHA256 pinned in the workflow. This follows the same convention as spawn's gitleaks install. The hash was cross-checked againstgolangci-lint-2.14.0-checksums.txtand against a local download.GOLANGCI_LINT_VERSION=2.14.0. The install hint now installs that exact version instead ofmaster's script.make lintwarns if your local version differs from the pin.Tests
stripAnsiCodesboundary cases: A/Z/a/z terminators, the non-letters next to them (@ [ \{`), and an unterminated escape. A mutation test confirmed they catch an off-by-one in the rewritten condition.internal/hygiene:TestCIGatesLintchecks that CI runsmake lintwith a pinned version and a pinned SHA256 check.make test,make lint(0 issues),make check-fmt,make check-docs, andscripts/verify-pins.shall pass locally.