From 8a6414d1e410ab65780a4c5eb99e79e5b9bc21c1 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Tue, 2 May 2023 05:04:11 +0200
Subject: [PATCH] CI: treat documentation warnings as errors

We do not want to merge documentation that produces Sphinx warnings.

scripts/kernel-doc uses environment variable KDOC_WERROR to determine
if warnings should be treated as errors.

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
 .azure-pipelines.yml | 2 +-
 .gitlab-ci.yml       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 76ffdeebd6..3c1846a5bc 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -89,7 +89,7 @@ stages:
           virtualenv -p /usr/bin/python3 /tmp/venvhtml
           . /tmp/venvhtml/bin/activate
           pip install -r doc/sphinx/requirements.txt
-          make htmldocs
+          make htmldocs KDOC_WERROR=1
           make infodocs
 
   - job: todo
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b193fee98f..e6c6ab3586 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -171,7 +171,7 @@ docs:
     - virtualenv -p /usr/bin/python3 /tmp/venvhtml
     - . /tmp/venvhtml/bin/activate
     - pip install -r doc/sphinx/requirements.txt
-    - make htmldocs
+    - make htmldocs KDOC_WERROR=1
     - make infodocs
 
 # some statistics about the code base
-- 
2.39.5