Skip to content

Add exhaustive initialization lint to MessageSyncProgress#4590

Open
cats2101 wants to merge 1 commit intoOffchainLabs:masterfrom
cats2101:fix/exhaustive-init-MessageSyncProgress
Open

Add exhaustive initialization lint to MessageSyncProgress#4590
cats2101 wants to merge 1 commit intoOffchainLabs:masterfrom
cats2101:fix/exhaustive-init-MessageSyncProgress

Conversation

@cats2101
Copy link
Copy Markdown

@cats2101 cats2101 commented Apr 1, 2026

Summary

  • Added // lint:require-exhaustive-initialization annotation to the MessageSyncProgress struct in arbnode/mel/messages.go
  • Fixed 2 initialization sites that used empty MessageSyncProgress{} literals to explicitly set all fields (BatchSeen, BatchProcessed, MsgCount) with zero values:
    • arbnode/mel/runner/mel.go:266 (error return in GetSyncProgress)
    • arbnode/inbox_reader.go:731 (error return in GetSyncProgress)
  • 2 other initialization sites (arbnode/mel/runner/mel.go:288 and arbnode/inbox_reader.go:738) already had all fields set

Ref #3121

Test plan

  • CI linter passes with the new annotation
  • Existing tests in arbnode/mel/runner and arbnode pass unchanged

🤖 Generated with Claude Code

Add the `// lint:require-exhaustive-initialization` annotation to the
MessageSyncProgress struct and fix all initialization sites to
explicitly set every field.

Ref OffchainLabs#3121
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 1, 2026

CLA assistant check
All committers have signed the CLA.

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.

3 participants