Repository navigation
fix(lint): add return after t.Fatal to satisfy staticcheck SA5011 - #185
Merged
Merged
Conversation
CI's golangci-lint (with staticcheck) flags SA5011 (possible nil pointer dereference) in three test files where a nil check + t.Fatal is followed by a dereference. staticcheck can't prove t.Fatal exits, so adding an explicit return after each t.Fatal satisfies the analyzer. These were pre-existing (not introduced by the guardrails rework) and have been failing CI on every push to main since before #168.
JAORMX
added a commit
that referenced
this pull request
Jun 25, 2026
Same class of staticcheck SA5011 failure as #185: a t.Fatalf nil-check without a trailing return makes staticcheck flag the next line as a possible nil pointer dereference. Adds the missing return after each t.Fatal in the three engine-module test files CI flagged. - engine/adapter/eventsource/review_test.go (result nil-check) - engine/adapter/sessnap/sessnap_test.go (restoredCall nil-check) - engine/agent/childregistry_internal_test.go (registry entry nil-check)
JAORMX
added a commit
that referenced
this pull request
Jun 25, 2026
Same class of staticcheck SA5011 failure as #185: a t.Fatalf nil-check without a trailing return makes staticcheck flag the next line as a possible nil pointer dereference. Adds the missing return after each t.Fatal in the three engine-module test files CI flagged. - engine/adapter/eventsource/review_test.go (result nil-check) - engine/adapter/sessnap/sessnap_test.go (restoredCall nil-check) - engine/agent/childregistry_internal_test.go (registry entry nil-check)
JAORMX
added a commit
that referenced
this pull request
Jun 25, 2026
…re transmit + spec-level verifier (#165) * fixup! fix(mecatui): kitty mascot never rendered on Ghostty — downscale before transmit + spec-level verifier * fix(lint): add return after t.Fatal in engine test files (SA5011) Same class of staticcheck SA5011 failure as #185: a t.Fatalf nil-check without a trailing return makes staticcheck flag the next line as a possible nil pointer dereference. Adds the missing return after each t.Fatal in the three engine-module test files CI flagged. - engine/adapter/eventsource/review_test.go (result nil-check) - engine/adapter/sessnap/sessnap_test.go (restoredCall nil-check) - engine/agent/childregistry_internal_test.go (registry entry nil-check) * docs(usage): add See-also cross-links to fix matlatl dead-end gate The #174 docs split created 11 docs/usage/*.md leaf files that had inbound links from the usage.md landing page's TOC but no outbound links onward — each was a 'dead-end' under matlatl's graduated-structure check. mecatl's .matlatl.yml promotes dead-ends from Info to Warning, and the CI docs gate runs --strict, so warnings fail the build. Adds a short 'See also' cross-link block to the tail of each dead-end file, linking to a natural sibling and back to the operator-guide index. This is the minimal fix: one outbound link clears the finding per file. Regenerates llms.txt (task docs:llms) for the changed markdown. --------- Co-authored-by: Jakub Hrozek <[email protected]>
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.
What
Fixes the CI lint failure (
staticcheck SA5011: possible nil pointer dereference) that has been breaking every push to main since before the guardrails rework.Why
Three test files had a nil-check +
t.Fatalfollowed by a pointer dereference.staticcheckcan't provet.Fatalexits the test, so it flags the dereference as a possible nil pointer. Adding an explicitreturnafter eacht.Fatalsatisfies the analyzer.Files
cmd/mecatui/ui/hook_test.go:175cmd/mecatui/ui/agents_overlay_test.go:528cmd/mecatui/ui/models_test.go:723Pre-existing issues, not introduced by the guardrails rework.