Skip to content

The doc build does not fail when a page leaves an AsciiDoc attribute unresolved #1147

Description

@vharseko

Problem

A page that uses an attribute it does not define, or a listing block that uses an attribute without subs="attributes", publishes the attribute literally, and nothing in the build notices. #1129 found two of these on the live site (msiexec /x opendj-{opendj-version}.msi /quiet in install-guide/chap-uninstall.adoc, unzip opendj-{opendj-version}.zip in admin-guide/chap-monitoring.adoc), and #1131 found the same in the generated reference.

  • The man-pages profile runs doc-maven-plugin 3.2.0 (asciidoc-pre-process, antora, asciidoc-to-pdf) without attribute-missing or any failure level, so Asciidoctor keeps the literal text and logs nothing.
  • No opendj-doc* module has tests, and the site is rendered only after merge, by deploy.yml.

Deleting :opendj-version: x.y.z from chap-uninstall.adoc again would bring the bug back with a green build.

Expected

The build (or a CI step on pull requests) fails when an attribute is left unresolved. The check has to cover both cases:

  1. an attribute used on a page that does not define it, and
  2. an attribute used in a verbatim block without subs="attributes".

A source-level grep, such as one asking every page that uses {opendj-version} to define :opendj-version:, catches (1) for one attribute only. Checking the rendered output for {name} text left behind catches both cases and every attribute, but has to allow the places where braces are meant literally (escaped placeholders from #1142, code samples).

Raised in the review of #1140.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions