Repository navigation
Conversation
houko
force-pushed
the
ci/gofmt-check
branch
from
November 18, 2026 02:42
172b5bb to
b8a320d
Compare
houko
force-pushed
the
ci/gofmt-check
branch
from
November 18, 2026 03:28
b8a320d to
c521c48
Compare
houko
force-pushed
the
ci/gofmt-check
branch
from
November 18, 2026 04:13
c521c48 to
ddb3d5c
Compare
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.
Summary
CI now runs an independent Go formatting job using the Go version in
go.mod. It fails with the filenames of unformatted tracked Go files; NUL-separated Git paths support spaces and leave untracked build output out of the check. The step runs underbash -eo pipefail, so a tracked file gofmt cannot parse fails the job with gofmt's error. A separatestyle:commit formats the 29 tracked files still unformatted on current main with Go 1.27.3 (the issue listed 33; four were formatted on main since).Closes #515.
Targets
core,base,ui,tsx, thensgotool)Formatting applies to all tracked Go sources, including platform-specific files. The contribution guide explains the check, in English and Chinese.
Screenshots
None; formatting and CI only.
Verification
gofmt -l(Go 1.27.3) over every tracked Go file prints nothing.go build ./..., andgo tool nsgo check -target allon a Mac; the Linux CI target list also passes on Linux.go tool nsgo teston every package the style commit touches, plus./cmd/nsgo(its workflow test parsescheck.yml),./internal/moduletestand-run 'Layer|Skills|Doc' ..internal/platform/windowstests on Windows 11: the same failures as main in that environment, none in the reformatted tests.bash -eo pipefail, rejects an unformatted staged file with a space in its name and lists it; passes once it is formatted, even with an unformatted untracked file present; fails on a tracked file with a syntax error; and passes with no Go files.Checklist