Satisfy the attgo struct field order and comment capitalisation rules - #421
Open
AntiD2ta wants to merge 4 commits into
Open
Satisfy the attgo struct field order and comment capitalisation rules#421AntiD2ta wants to merge 4 commits into
AntiD2ta wants to merge 4 commits into
Conversation
The attgo linter's struct field order rule groups fields as logger, metrics, dependency, data, synchronization, and its capital comment rule expects prose comments to start with a capital letter. Neither held anywhere in the tree, between them accounting for 105 of the 108 findings a full run reports. Reorder the fields of the 39 affected structs, capitalise the 11 comments that are ordinary prose, and bring the copyright headers of the touched files up to date as attgo_current_year requires. The reordering is a pure permutation of existing declarations, verified line by line: no field, type or tag changed. Nine capital comment findings are deliberately left alone, because satisfying them would do harm: - "skipcq:" (three) and "revive:disable:nolint" (three) are directives addressed to other tools, which stop being recognised if capitalised. - "attest carries out..." and "sign signs..." document the unexported funcs attest and sign, and a Go doc comment opens with the name of the thing it documents. The rule's own identifier exemption misses these only because it matches on a fixed list of following words. - One is commented-out code. The three attgo_no_pkg_logger findings are also left: moving the package-level loggers into struct fields changes how vouch does logging rather than how it is formatted. Findings drop from 108 to 12. No functional change.
AntiD2ta
force-pushed
the
lint-attgo-cosmetic-sweep
branch
from
August 21, 2026 09:14
79857e3 to
546215c
Compare
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.
Stacked on #420 (
gloas-epbs-proposer), so this diff is the sweep alone. Retarget togloasonce #420 merges.Pure style; no functional change. A full
./custom-gcl rungoes from 108 findings to 12.What changed
attgo_struct_field_orderattgo_capital_commentattgo_no_pkg_loggerCopyright headers on the touched files were bumped, as
attgo_current_yearrequires.Why 12 remain
Nine
attgo_capital_commentfindings are left deliberately, because satisfying them would do harm:// skipcq: ...(3) and//revive:disable:nolint(3) are directives addressed to other tools. Capitalising them stops those tools recognising them, silently re-enabling whatever they suppress.// attest carries out...and// sign signs...document the unexported funcsattestandsign. A Go doc comment opens with the name of the thing it documents, so capitalising would assert an exportedAttest/Signthat does not exist. The rule has an identifier exemption but it matches on a fixed list of following words, whichcarriesandsignsare not in.The three
attgo_no_pkg_loggerfindings (logging.go,services/metrics/prometheus,services/signer/standard) are a change to how vouch does logging rather than how it is formatted, so they are not folded into a formatting sweep.Verification
go build ./...clean.gosilent test ./...896 tests pass.Note
These findings all pre-date the Gloas work. Measured against
origin/gloas, #420 introduces zero new lint findings and removes four.