Skip to content

CI: check the anchors of links in the pull request build #36

Closed

Description

@vharseko

The link check of the pull request build (#28) runs lychee --offline without --include-fragments, so only the page part of a link is checked. Antora does not check the fragment of an xref either: renaming a section id so that xref:page.adoc#old-id points nowhere gives neither an Antora error nor a broken link, and the check passes. Raised in the review of #28.

Measured

lychee 0.24.2 over a local build of master (same options as build.yml), with and without --include-fragments:

  • 379 more broken links, all Cannot find fragment;
  • the check takes 3 min 29 s instead of 54 s.

Of the 379:

  • 342 point to the id of the target page itself, e.g. chap-resource-conf#chap-resource-conf. Antora renders the document title as <h1 class="page"> without an id, so the browser just opens the top of the page; harmless for the reader.
  • 37 point to a section that is not there (31 OpenAM, 4 OpenDJ, 2 OpenIDM), listed below. Most are <<id>> references to a section of another chapter, which the converter resolves to the current page or to index.html. The two .:chap-jee-agent-config.adoc ones are doc-maven-plugin AntoraMojo: xref:./file.adoc is converted to an invalid .:file.adoc commons#315.

Proposal

  1. Run lychee with --include-fragments.
  2. In .github/build-baseline/check.sh and in the summary of build.yml, drop a broken fragment that equals the name of the target page (lychee's regular expressions have no back references, so this is done on the JSON report).
  3. Report the 37 in the product repositories and add them to .github/build-baseline/broken-links.txt with check.sh --update.
The 37 broken anchors
Page Link
openam/admin-guide/chap-monitoring.html openam/admin-guide/chap-monitoring.html#interface-stability
openam/admin-guide/chap-session-state.html openam/admin-guide/chap-session-state.html#chap-cdsso
openam/admin-guide/chap-session-state.html openam/admin-guide/chap-session-state.html#chap-saml-1
openam/admin-guide/chap-session-state.html openam/admin-guide/chap-session-state.html#configure-policies-with-console
openam/admin-guide/chap-session-state.html openam/admin-guide/chap-session-state.html#configure-session-quotas
openam/admin-guide/chap-session-state.html openam/admin-guide/chap-session-state.html#saml2-and-session-state
openam/admin-guide/chap-session-state.html openam/admin-guide/chap-session-state.html#session-mgmt
openam/admin-guide/chap-session-state.html openam/admin-guide/chap-session-state.html#session-upgrade
openam/admin-guide/chap-session-state.html openam/admin-guide/chap-session-state.html#snmp-sessions
openam/dev-guide/chap-client-dev.html openam/admin-guide/index.html#configure-openid-connect-discovery
openam/dev-guide/chap-client-dev.html openam/admin-guide/index.html#configure-uma-discovery
openam/dev-guide/chap-client-dev.html openam/dev-guide/chap-client-dev.html#chap-sts
openam/dev-guide/chap-client-dev.html openam/dev-guide/index.html#appendix-deprecated-apis
openam/dev-guide/chap-client-dev.html openam/dev-guide/index.html#rest-api-auth
openam/install-guide/chap-prepare-install.html openam/admin-guide/index.html#tuning-jvm-for-openam
openam/jee-users-guide/chap-apache-tomcat.html openam/jee-users-guide/chap-apache-tomcat.html#.:chap-jee-agent-config.adoc#configure-j2ee-policy-agent
openam/jee-users-guide/chap-jee-agent-config.html openam/jee-users-guide/chap-jee-agent-config.html#filter-modes
openam/jee-users-guide/chap-jee-agents-features.html openam/jee-users-guide/index.html#j2ee-agent-cookie-reset-properties
openam/jee-users-guide/chap-jee-agents-features.html openam/jee-users-guide/index.html#j2ee-agent-fqdn-properties
openam/jee-users-guide/chap-jee-agents-features.html openam/jee-users-guide/index.html#j2ee-agent-general-properties
openam/jee-users-guide/chap-jee-agents-features.html openam/jee-users-guide/index.html#j2ee-agent-not-enforced-uri-properties
openam/jee-users-guide/chap-jetty.html openam/jee-users-guide/chap-jetty.html#.:chap-jee-agent-config.adoc#configure-j2ee-policy-agent
openam/jee-users-guide/chap-troubleshooting.html openam/jee-users-guide/index.html#install-with-ibm-jvm
openam/reference/chap-endpoints.html openam/dev-guide/index.html#rest-api-uma-well-known
openam/reference/chap-log-messages.html openam/admin-guide/index.html#debug-logging
openam/reference/openam-cli-tools.html openam/install-guide/index.html#install-openam-admin-tools
openam/reference/openam-cli-tools.html openam/reference/openam-cli-tools.html#ssoadm-create-policies
openam/reference/openam-cli-tools.html openam/reference/openam-cli-tools.html#ssoadm-delete-policies
openam/reference/openam-cli-tools.html openam/reference/openam-cli-tools.html#ssoadm-list-policies
openam/reference/openam-cli-tools.html openam/reference/openam-cli-tools.html#ssoadm-update-policies
openam/web-users-guide/chap-msiis-7.html openam/web-users-guide/index.html#chap-web-agents
opendj/admin-guide/chap-admin-tools.html opendj/reference/admin-tools-ref#ldif-diff-1
opendj/admin-guide/chap-import-export.html opendj/reference/admin-tools-ref#ldif-diff-1
opendj/admin-guide/chap-import-export.html opendj/reference/admin-tools-ref#make-ldif-template-5
opendj/server-dev-guide/chap-ldap-operations.html opendj/reference/admin-tools-ref#ldif-diff-1
openidm/integrators-guide/chap-auth.html openidm/integrators-guide/index.html#openam-session-module
openidm/integrators-guide/chap-auth.html openidm/integrators-guide/index.html#supported-session-modules

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciContinuous integration, build and publish workflowsdocumentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions