Skip to content

tags.rb: report normative tags in admonitions as errors - #263

Merged
Bill Traynor (wmat) merged 1 commit into
riscv:mainfrom
davidharrishmc:norm-tags-in-admonitions
Oct 1, 2026
Merged

Bill Traynor (wmat) merged 1 commit into
riscv:mainfrom
davidharrishmc:norm-tags-in-admonitions

Conversation

@davidharrishmc

Copy link
Copy Markdown
Contributor

Admonitions are non-normative, so the tags backend now reports an error for a tag inside an admonition of any type, or for an anchor on the line just above one, which tags the admonition itself. The norm-tag builds run with --failure-level=WARN, so this fails the build. This replaces the pre-commit script proposed in riscv/riscv-isa-manual#3443, following this suggestion to put the check in the normative-rule tooling.

This reverses the guidance in normative-rules.md §4, which described how to tag admonitions. That section now says to move the text out of the admonition or drop the tag. The admonition cases in test-ch2.adoc move to a new tests/tags/admonition.adoc, which must fail and report each bad tag; the expected outputs lose those 7 rules.

On riscv-isa-manual, this reports the same 37 tags as #3443's script before riscv/riscv-isa-manual#3439, and the same 4 on current main. The ISA manual should take this submodule update only after riscv/riscv-isa-manual#3440, #3441 and #3442 merge, which remove the last 4.

🤖 Generated with Claude Code

Admonitions are non-normative, so a tag inside one, or an anchor on the
line just above one (which tags the admonition itself), is an error.
With --failure-level=WARN, as the norm-tag builds use, this fails the
build.

The admonition cases in test-ch2.adoc move to tests/tags/admonition.adoc,
which must fail and report each bad tag, and normative-rules.md now says
admonitions cannot hold normative rules.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: David Harris <David_Harris@hmc.edu>
@wmat
Bill Traynor (wmat) merged commit 1ba53de into riscv:main Oct 1, 2026
3 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.

3 participants