From bbae198c94264c25bfa7b31457eb50ccc26e8548 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Thu, 4 Dec 2025 14:16:31 +0200 Subject: [PATCH] chore: remove htmltest from the project Signed-off-by: Mykhailo Kuznietsov --- .../workflows/build-and-validate-on-pr.yaml | 23 ------------ .../workflows/build-and-validate-on-push.yaml | 26 ------------- .htmltest.yml | 37 ------------------- CONTRIBUTING.adoc | 2 - Containerfile | 2 - antora-playbook-for-development.yml | 2 - code_review_checklist.adoc | 1 - extensions/htmltest.js | 21 ----------- tools/build.sh | 1 - 9 files changed, 115 deletions(-) delete mode 100644 .htmltest.yml delete mode 100644 extensions/htmltest.js diff --git a/.github/workflows/build-and-validate-on-pr.yaml b/.github/workflows/build-and-validate-on-pr.yaml index 2a63a4ed9a..f52fdb72e4 100644 --- a/.github/workflows/build-and-validate-on-pr.yaml +++ b/.github/workflows/build-and-validate-on-pr.yaml @@ -24,26 +24,6 @@ jobs: with: fetch-depth: 0 # Necessary for git diff in vale step - # Cache for Antora UI and Htmltest. - # See: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows - # Htmltest accepts 2 weeks old cache for the status code of checked external URLs - # See: https://github.com/wjdp/htmltest - # Refresh the cache every week to avoid a stale cache for htmltest - # See: https://github.com/actions/cache - # See: http://man7.org/linux/man-pages/man1/date.1.html - - name: Get Date - id: get-date - run: echo "YEAR_WEEK=$(/bin/date -u +%Y%U)" >> $GITHUB_OUTPUT - shell: bash - - - name: Restore cache - uses: actions/cache@v3 - env: - cache-name: cache - with: - path: .cache - key: ${{ steps.get-date.outputs.YEAR_WEEK }} - - name: Build using antora # and fail on warning id: antora-build run: CI=true antora generate antora-playbook-for-development.yml --stacktrace --log-failure-level=warn @@ -62,9 +42,6 @@ jobs: PR_NUMBER PR_SHA - - name: Validate links using htmltest - id: validate-links - run: htmltest - name: Report unused content run: tools/detect-unused-content.sh diff --git a/.github/workflows/build-and-validate-on-push.yaml b/.github/workflows/build-and-validate-on-push.yaml index 63e5f7ac31..5afb793c2f 100644 --- a/.github/workflows/build-and-validate-on-push.yaml +++ b/.github/workflows/build-and-validate-on-push.yaml @@ -7,9 +7,6 @@ # SPDX-License-Identifier: EPL-2.0 # -# GitHub Actions configuration file for htmltest -# See: https://github.com/wjdp/htmltest - name: Build and validate on: push: @@ -26,25 +23,6 @@ jobs: with: fetch-depth: 0 - # Cache for Antora UI and Htmltest. - # See: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows - # Htmltest accepts 2 weeks old cache for the status code of checked external URLs - # See: https://github.com/wjdp/htmltest - # Refresh the cache every week to avoid a stale cache for htmltest - # See: https://github.com/actions/cache - # See: http://man7.org/linux/man-pages/man1/date.1.html - - name: Get Date - id: get-date - run: echo "YEAR_WEEK=$(/bin/date -u +%Y%U)" >> $GITHUB_OUTPUT - shell: bash - - name: Restore cache - uses: actions/cache@v3 - env: - cache-name: cache - with: - path: .cache - key: ${{ steps.get-date.outputs.YEAR_WEEK }} - - name: Build using antora id: antora-build run: CI=true antora generate antora-playbook-for-development.yml --stacktrace --log-failure-level=warn @@ -55,10 +33,6 @@ jobs: name: doc-content path: build/site - - name: Validate links using htmltest - id: validate-links - run: htmltest - - name: Report unused content run: tools/detect-unused-content.sh diff --git a/.htmltest.yml b/.htmltest.yml deleted file mode 100644 index 4a58e4d900..0000000000 --- a/.htmltest.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# -# Copyright (c) 2020 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# - -# Configuration file for htmltest -# See: https://github.com/wjdp/htmltest - -DirectoryPath: build/site # Not build/site to avoid false positives on 404.html -# IgnoreInternalEmptyHash: true # Legit empty hash present in every page -OutputDir: .cache/htmltest -CacheExpires: "12h" # Default is 2 weeks. -ExternalTimeout: 60 # (seconds) default is 15. -IgnoreURLs: - - https://cse.google.com/cse.js - - https://marketplace.visualstudio.com - - https://github.com/eclipse-che/che-docs/edit/main/ - - https://projectlombok.org/ - - https://developers.redhat.com/* - - https://docs.github.com/en/* - - https://velero.io/* - - https://che.eclipseprojects.io/ - - https://app.vsaex.visualstudio.com/app/register/ - - https://mattermost.eclipse.org/eclipse/channels/eclipse-che - - https://git.example.com:8443 - - https://stackoverflow.com/questions/tagged/eclipse-che - - https://example.com/ - - https://gdpr.eu/ - - https://prometheus.io/* - - https://www.gnu.org/* - - https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpsslCAInfo - diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 9ac13888fc..5a7b4b6687 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -36,8 +36,6 @@ To understand the nature of topics, see the link:https://redhat-documentation.gi ** link:https://asciidoctor.org/docs/asciidoc-writers-guide/[AsciiDoc] is the markup language. -** link:https://github.com/wjdp/htmltest[htmltest] validates the links. - ** link:https://docs.errata.ai/vale/about/[Vale] validates the language. ** link:https://www.shellcheck.net/[ShellCheck] validates the shell scripts. diff --git a/Containerfile b/Containerfile index 80f126ad04..3799688b55 100644 --- a/Containerfile +++ b/Containerfile @@ -47,7 +47,6 @@ RUN set -x \ git-core \ graphviz \ grep \ - htmltest \ jq \ nodejs \ python3-pip \ @@ -109,7 +108,6 @@ RUN set -x \ && curl --version \ && git --version \ && gulp --version \ - && htmltest --version \ && jq --version \ && pip3 freeze \ && vale --version \ diff --git a/antora-playbook-for-development.yml b/antora-playbook-for-development.yml index 51b9686c5b..d7ab775545 100644 --- a/antora-playbook-for-development.yml +++ b/antora-playbook-for-development.yml @@ -2,7 +2,6 @@ # Use this Antora Playbook for development, to build current state in HEAD. site: title: Eclipse Che Documentation - # Disabling url on purpose to avoid htmltest crawling the live website. # url: https://www.eclipse.org/che/docs start_page: docs:overview:introduction-to-eclipse-che.adoc robots: allow @@ -19,7 +18,6 @@ antora: index_latest_only: true snippet_length: 142 - require: '@antora/collector-extension' # Single-source content from engineering repositories, see https://gitlab.com/antora/antora-collector-extension - - require: ./extensions/htmltest.js # Test links in HTML, see https://docs.antora.org/antora/latest/extend/extension-tutorial/ - require: '@antora/pdf-extension' # Generate monolithic AsciiDoc files, see https://gitlab.com/antora/antora-assembler asciidoc: diff --git a/code_review_checklist.adoc b/code_review_checklist.adoc index 320347b155..8ebbf9295d 100644 --- a/code_review_checklist.adoc +++ b/code_review_checklist.adoc @@ -9,7 +9,6 @@ These automated steps block the pull request merge. * [ ] *`Build and validate PR / link checker (pull_request)`* is successful ** [ ] *`Build using Antora`* step is successful: documentation is building without warnings, and all AsciiDoc attributes have a definition. -** [ ] *`Validate links using htmltest`* step is successful: internal and external links are valid. ** [ ] *`Validate language on files added or modified`* step is successful and reports no vale errors: basic language validation, no major deviations from link:https://www.oreilly.com/library/view/the-ibm-style/9780132118989/[IBM Style Guide] and link:https://redhat-documentation.github.io/supplementary-style-guide/[Supplementary Style Guide], and project specific language rules. * [ ] *`eclipsefdn/eca`* is successful: all contributors have signed the Eclipse Contributor Agreement (ECA). diff --git a/extensions/htmltest.js b/extensions/htmltest.js deleted file mode 100644 index 0d5b2bbcd4..0000000000 --- a/extensions/htmltest.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2022 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// - -// Validate the docs asynchronously. -'use strict' -module.exports.register = function () { - this.on('sitePublished', () => { - require('child_process').execFile('htmltest', (error, stdout, stderr) => { - if (error) { - console.log(stdout + stderr); - return; - } - console.log(stdout); - }) - }) -} diff --git a/tools/build.sh b/tools/build.sh index d088f8164b..cae6a893f5 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -12,4 +12,3 @@ set -ex umask 002 CI=true antora generate antora-playbook-for-development.yml --stacktrace --log-failure-level=warn -htmltest