Skip to content

style(antora.yml): satisfy the yamlfmt pre-commit hook - #257

Merged
Bill Traynor (wmat) merged 1 commit into
mainfrom
fix/yamlfmt-antora
Aug 28, 2026
Merged

Bill Traynor (wmat) merged 1 commit into
mainfrom
fix/yamlfmt-antora

Conversation

@wmat

Copy link
Copy Markdown
Collaborator

Problem

The pre-commit workflow has been failing on main since 121444f (merge of #253). The yamlfmt hook reformats antora.yml, so the hook reports modified files and the job exits non-zero. The last green run on main was 2aef34e on 2026-07-31.

Because the check runs against the merge with main, every PR opened since then inherits the red check regardless of what it touches — e.g. #256, which does not go near a YAML file the hook rewrites.

Fix

Apply exactly what the hook produces:

+---
 name: common
 title: Common Assets
-version: ~
+version:

Both ~ and an empty value parse to YAML null, so the component stays versionless and Antora's behaviour is unchanged (yaml.safe_load → {'name': 'common', 'title': 'Common Assets', 'version': None} before and after).

Verification

pre-commit run --all-files passes locally with no files modified:

check for broken symlinks............................(no files to check)Skipped
check yaml...............................................................Passed
fix end of files.........................................................Passed
trim trailing whitespace.................................................Passed
Format YAML files........................................................Passed

🤖 Generated with Claude Code

The pre-commit workflow has been failing on main since 121444f: yamlfmt
reformats antora.yml, so the hook reports modified files and exits
non-zero. Every PR opened against main inherits the red check.

Apply what the hook produces: add the document start marker and write
the null version as an empty value. Both forms parse to null, so the
component stays versionless and Antora's behaviour is unchanged.

`pre-commit run --all-files` now passes with no files modified.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Bill Traynor <wmat@riscv.org>
@wmat
Bill Traynor (wmat) merged commit 04fc0a3 into main Aug 28, 2026
7 checks passed
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.

1 participant