Repository navigation
fix(inspect): Handle all unhandled error results (Phase 4) - #234
Merged
Merged
Conversation
Resolve 117 GoUnhandledErrorResult inspection warnings across 28 files.
Production code:
- Close errors: defer iox.Close(&err, ...) with named returns in
executor.go; errors.Join on error paths in archive extraction loops
- Fprintf/Fprint to strings.Builder and os.Stderr: explicit _, _ = discard
- os.RemoveAll in testrunner: defer func() { _ = os.RemoveAll(...) }()
Test code:
- os.Setenv → t.Setenv in credentials_test.go (idiomatic, auto-restores)
- Bare .Close() → _ = .Close() or checked with t.Fatal
- os.RemoveAll test setup → checked with t.Fatal (invalid premise on failure)
- catalog.Shadow, buf.ReadFrom → explicit _, _ = discard
Style fixes in touched functions:
- Added blank line after function signature per Go style guidelines
David-Noble-at-work
pushed a commit
that referenced
this pull request
Sep 23, 2026
vet, lint and test all rc=0. golangci-lint clean includes misspell with locale US, so the two Go files the sweep touched satisfy the Go-side gate as well as the prose rule they were changed for -- three doc comments in pkg/op, acknowledgement to acknowledgment, no identifier touched. An earlier gate run reported vet failing on pkg/op. It does not: go vet and go build both exit 0 on this branch, and the run that said otherwise was cut off when its session ended. Re-run rather than explained away. Requirement 1 says two stems bite and three did. The third, cancell, was found by Requirement 3 after the sweep rather than foreseen before it, which is what that requirement is for; the heading now says so. Phase 4 closes noblefactor-ops#234, which is a noblefactor-ops pull request, so this plan stays active until then -- the same shape #234 itself is in, and for the same reason.
David-Noble-at-work
added a commit
that referenced
this pull request
Sep 23, 2026
* chore(plan): the US English ruling reaches this repository Phase 4 of noblefactor-ops#234, whose Phases 1-3 merged as noblefactor-ops#235. misspell enforces the rule inside Go source and nothing checks prose, so 110 British spellings across 45 tracked files have drifted in. The plan carries the two stems that bite. `programme` is matched as a whole word, because this tree holds programming, programmatic, programmer and programmers -- every one begins with it, and a stem replace produces "programr". And `catalogued` is corrected before the `catalogue` stem runs, because the stem alone turned it into "catalogd" in the other repository. It also carries the rule that catches both: check every word the sweep PRODUCES, not every word it replaces. "catalogd" is not a British spelling and no British-spelling search finds it afterwards. * chore(docs): prose is US English here too Phase 4 of noblefactor-ops#234, whose Phases 1-3 merged as noblefactor-ops#235. Ruled 2026-09-23: "we're US ... all words should be in US English." 110 British spellings across 45 files, 26 distinct words. licence 29, behaviour 24, cancelled 9, neighbours 6, analogue 5, modelled and artefacts 4 each. analogue goes to analog under the ruling even though every use is the counterpart sense -- "the closest structural analogue" -- where the -ue form is standard in American writing. No word is exempt; the same question was asked of catalogue in the other repository and answered the same way. Three stems needed care, and the third was found by the rule rather than foreseen. programme is matched as a whole word: this tree holds programming, programmatic, programmer and programmers, and a stem replace makes "programr". catalogued is corrected before the catalogue stem, which turned it into "catalogd" in noblefactor-ops. And cancell -> cancel over-reached: it is right for cancelled and cancelling, the only two forms the dictionary asks for, and wrong for the 23 cancellation and 2 cancellable it also hit. cancellation is correct US English. Both restored. That was caught by comparing each word form's count on the removed and added lines, not by re-running the British-word search -- which by construction cannot see "cancelation", a word in neither language. All 33 forms balance. The legal lines are four, and they change spelling and nothing else. Apache License 2.0 was already correct and is untouched: CONTRIBUTING.md "## Licence and sign-off" -> "## License and sign-off" CONTRIBUTING.md "licence, any contribution" -> "license, any contribution" TRADEMARK.md "That licence" -> "That license" TRADEMARK.md "Programme terms will live" -> "Program terms will live" No prose gate is added here. It arrives with #932, which consolidates document checks into star; a bash gate now would be one more thing for that lane to delete. Verified: zero dictionary hits across all 1663 tracked files; no binary touched. * chore(plan): #935 records Phase 3, and why it stays active vet, lint and test all rc=0. golangci-lint clean includes misspell with locale US, so the two Go files the sweep touched satisfy the Go-side gate as well as the prose rule they were changed for -- three doc comments in pkg/op, acknowledgement to acknowledgment, no identifier touched. An earlier gate run reported vet failing on pkg/op. It does not: go vet and go build both exit 0 on this branch, and the run that said otherwise was cut off when its session ended. Re-run rather than explained away. Requirement 1 says two stems bite and three did. The third, cancell, was found by Requirement 3 after the sweep rather than foreseen before it, which is what that requirement is for; the heading now says so. Phase 4 closes noblefactor-ops#234, which is a noblefactor-ops pull request, so this plan stays active until then -- the same shape #234 itself is in, and for the same reason.
4 of 5 tasks
David-Noble-at-work
added a commit
that referenced
this pull request
Sep 24, 2026
…942) * chore(plan): the star design record arrives where the code is Step 1 of noblefactor-ops#228, lane 19 of noblefactor-ops#217 -- the last lane of that schedule. Three documents in noblefactor-ops are the only written design of code that ships here: the goast doc-comment styler, five star analysis providers absent from this repository's own provider catalog, and pkg/gitignore's ignore stack. Ruled 2026-09-23: the numbered series, "as is our pattern for design documents (they sort in read order that way)." Section 9, Star, turns out to be the only section whose documents are not numbered -- 1 through 8 and 10 all are -- so the section is numbered here too, not only its new arrivals. star-extensions.md becomes 9-star-extensions.md and the three arrive as 9.1, 9.2 and 9.3. The plan also corrects #228's scope. It says this step closes the index's two "(planned)" gaps; neither is a document that moves, and the WASM one can never be filled -- noblefactor-ops#230 deleted it because no repository holds that subsystem. The index gains three entries and loses two promises. * doc(architecture): the star design record arrives, numbered Section 9, Star, was the only section whose documents were not numbered -- 1 through 8 and 10 all are. star-extensions.md becomes 9-star-extensions.md and the three arrivals are numbered with it: 9.1-doc-comment-styling.md the goast styler behind star lint go-style 9.2-source-analysis.md five providers: starcode, starindex, starstats, starcomplexity, staranalysis 9.3-file-tree-walking.md pkg/gitignore's ignore stack Each carries a note saying what is as-is against this code and what is already superseded. noblefactor-ops#130 deleted that repository's Starlark warning that "a diverged second copy is how the next person builds the wrong thing"; a document moved without that note is the same hazard in prose. 9.1's note is the longest, because its "Porting to devlore-cli" section is an unfinished migration and reads like instructions -- #938. 9.2 arrived wrapped in a stray ```markdown fence, opened on line 1 and closed at EOF, so its frontmatter was never frontmatter. That is why noblefactor-ops carried it in .github/frontmatter-exempt. Unwrapped on arrival. Two salvages. "The Shape of the Tree" -- star <service> <resource> <verb>, a service token names a service or product and never a tool, and a flag that changes what a command is is a second verb -- had no counterpart here. 10-command-line-interface.md section 3 states only the two-token rule for writ and lore. And two tables into configuration.md: the field-type strings and the config.sync mapping, with the type names brought up to date (ConfigSpec is config.Spec now). * doc(architecture): the indices name what is actually there index.md section 9 gains the three arrivals and loses two promises. #228 said this step closes the two "(planned)" entries; neither was a document that moved, and one could never be closed -- Star WASM Receivers described a subsystem noblefactor-ops#230 deleted the design for, because no repository holds it. Removed rather than filled. Star Configuration is not moving as a document, so its entry points at configuration.md, where its two salvaged tables now live. 3.5-provider-catalog.md calls itself "the index of record for which providers exist" and listed none of star's own. It gains goast and the five analysis providers in a table of their own: they announce the same way, but live under cmd/star/provider rather than pkg/op/provider, and that distinction is worth seeing. pkg/gitignore is named as not-a-provider with a pointer to 9.3. Six back-references repointed. Two were absolute URLs into noblefactor-ops plans that #228 deletes, so they are no longer links; one pointed at star-file-tree-walking.md, which is now 9.3 here, so it is a local link; three were prose naming documents that #228 retires, which now say so. One broken link came in with the move: 9.3 linked twice to ../guides/writing-extensions.md, a noblefactor-ops guide that does not exist here and that #228 disposes of. Every relative .md link in the seven changed architecture documents now resolves, checked. * chore(plan): #937 records Phase 4, and corrects a claim it nearly shipped vet, lint and test all rc=0. No Go changed, so they prove nothing was broken rather than anything fixed. What was actually checked: every relative .md link in the seven changed architecture documents resolves -- which caught one the move carried in, 9.3 linking twice to ../guides/writing-extensions.md, a noblefactor-ops guide that does not exist here -- and codespell's en-GB_to_en-US dictionary over the three arrivals reports zero. Phase 5 was wrong. It said this branch closes devlore-cli#935. #935's remaining box reads "in the next noblefactor-ops pull request through", a condition no pull request in this repository can satisfy, so the claim was false and is removed from the plan and from the pull request body before either shipped. The shape is worth more than the tick: a plan whose last phase lands in another repository cannot close itself. #234 and #935 are the same trap pointing in opposite directions, written the same day by the same hand. #234 closes in noblefactor-ops#228 step 2, and #935 in whatever devlore-cli pull request follows it.
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.
Summary
GoUnhandledErrorResultinspection warnings (Phase 4 of the GoLand inspection cleanup plan)defer iox.Close(&err, ...)with named returns in executor.go;errors.Joinon error paths in archive extraction loopsfmt.Fprintf/Fprinttostrings.Builderandos.Stderr: explicit_, _ =discardos.Setenv→t.Setenv, bare.Close()→ checked or explicitly discarded,os.RemoveAllin test setup → checked witht.FatalTest plan
make vetpassesmake testpasses (all 73 packages)legacy|backward|compat|deprecated— no actionable matches