Skip to content

fix: use single space before frozen comment in YAML config#1944

Closed
Ai-chan-0411 wants to merge 1 commit into
j178:masterfrom
Ai-chan-0411:fix/frozen-comment-single-space
Closed

fix: use single space before frozen comment in YAML config#1944
Ai-chan-0411 wants to merge 1 commit into
j178:masterfrom
Ai-chan-0411:fix/frozen-comment-single-space

Conversation

@Ai-chan-0411

Copy link
Copy Markdown

Summary

  • Fix double-space before # frozen: comment in YAML config output
  • The render_updated_yaml_config() function used " # frozen:" (two spaces) instead of " # frozen:" (one space), inconsistent with the TOML path which correctly uses single space
  • Updated corresponding test expected values to match

Details

In auto_update.rs, the format string at the YAML frozen comment render had an extra leading space. The TOML path (render_updated_toml_config) already uses the correct single-space format.

Fixes #1941

Test plan

  • Updated all 15 test assertions to use single space
  • Verified TOML path already uses single space (consistent)

🤖 Generated with Claude Code

auto-update --freeze was adding 2 spaces before the `# frozen:` comment in
YAML config files, which caused `prettier` (and other YAML formatters that
enforce single-space before inline comments) to rewrite the line on the next
hook run.

Fixes j178#1941
@j178

j178 commented Apr 15, 2026

Copy link
Copy Markdown
Owner

Thanks, I think we should preserve the original spacing instead of fixed 1 space. I fixed it in #1945.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

auto-update --freeze adds 2 spaces before # frozen: comment, causing prettier hook to fail

2 participants