Repository navigation
ci: disable omitzero modernizer - #2370
Open
cadejacobson wants to merge 1 commit into
Open
cadejacobson wants to merge 1 commit into
cadejacobson wants to merge 1 commit into
Conversation
Binary size report (
|
| Size | |
|---|---|
Base (main) |
33MiB |
| PR (#2370) | 33MiB |
| Delta | +0B (0.00%) |
yasminvalim
approved these changes
Nov 27, 2026
yasminvalim
enabled auto-merge
November 27, 2026 15:48
This branch has not been deployed
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.
This PR disables the
omitzeromodernizer in the Go 1.26 ci pipeline. All other modernizers remain enabled.The analyzer here assumes that Ignition always uses standard-Golang-library JSON semantics, where
omitemptyhas no effect on non-pointer structs. Butane instead importsgithub.com/clarketm/jsonand uses itsMarshalandMarshalIndentfunctions which are not standard-library based. That encoder for Butane explicitly documents support for omitting structs whose fields are empty. Its implementation recursively checks exported fields and will honor theomitemptytag if present. Applying the suggestions would therefore change Butane’s output. Disabling the analyzer preserves existing serialization and removes 129 findings across eight generated schema files, including frozen specifications.Note: the
omitzeroreference here is both a modernizer and the name of an optimization/flag. Theomitzeroanalyzer checks for bothomitzeroandomitemptyflags, both of which are harmless in this case but would introduce a change in behavior if accepted and removed. More information about this can be found at the official Golang omitzero modernizer documentation.On the main branch, the
checking gofmtline is at 1761, and on this branch, thechecking gofmtline is at 420, so this successfully removes 76% of allgo fixwarnings.