Repository navigation
style: make zig fmt --check pass and enforce it in CI - #121
Merged
Merged
Conversation
Realign the node-type name lists in normaliseNodeType the way zig fmt 0.17 lays them out. Whitespace only; this was the last tracked Zig file that failed zig fmt --check. Signed-off-by: ata-sesli <atasesli@protonmail.com>
Run zig fmt --check on build.zig and src/ in the sdk job, which already installs Zig 0.17.0 through setup-zova, so an unformatted Zig file fails CI instead of reaching main. Signed-off-by: ata-sesli <atasesli@protonmail.com>
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
zig fmt --check build.zig srcnow passes on every tracked Zig file, and CI runs it so it stays that way.Problem
src/simhash/minhash.zigwas not formatted the wayzig fmt0.17 lays it out. #119 fixed the only other offender,src/watcher/watcher.zig. Nothing in CI ranzig fmt, so this kind of drift could reachmainunnoticed.Changes
style(simhash): satisfy zig fmt. Realigns the three string-list literals innormaliseNodeType. Whitespace only.ci: check Zig formatting. Adds azig fmt --check build.zig srcstep to thesdkjob inci.yml. That job already installs Zig 0.17.0 throughsetup-zova, so the step needs no new action and no extra setup.Verification
zig fmt --check build.zig src(Zig 0.17.0) passes locally. It covers all 14 tracked.zig/.zonfiles.zig ast-check src/simhash/minhash.zigpasses. The diff is whitespace only, so I did not rerun the test suite.tests/test_github_workflows.sh,tests/test_zova_build_workflow.shandgit diff --checkpass.