From ff32eb7739ef50fdaf57045953820f3a7b45f39e Mon Sep 17 00:00:00 2001 From: Joseph Steele <129185788+js360000@users.noreply.github.com> Date: Sun, 17 May 2026 23:33:01 +0100 Subject: [PATCH] Add exhaustive initialization lint to MachineStepResultJson Annotates `MachineStepResultJson` in validator/server_api/json.go with `// lint:require-exhaustive-initialization`. The struct has 4 fields (Hash, Position, Status, GlobalState) and only one initialization site in this repo (the adjacent MachineStepResultToJson helper), which already sets all four fields. No initializer changes needed. Adding the annotation ensures any future addition of a field to this struct will trip the linter on the existing initializer instead of silently zero-valuing, which is the goal stated in the issue. Addresses #3121 following the one-struct-per-PR guidance from the maintainers in earlier threads. --- validator/server_api/json.go | 1 + 1 file changed, 1 insertion(+) diff --git a/validator/server_api/json.go b/validator/server_api/json.go index 7c3080b25c6..8296f65794e 100644 --- a/validator/server_api/json.go +++ b/validator/server_api/json.go @@ -20,6 +20,7 @@ import ( const Namespace string = "validation" +// lint:require-exhaustive-initialization type MachineStepResultJson struct { Hash common.Hash Position uint64