Browse Source

Enforce documentation link warnings in CI

Jelmer Vernooij 1 tháng trước cách đây
mục cha
commit
50f4e2d477
2 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 1 1
      .github/workflows/docs.yml
  2. 3 2
      Makefile

+ 1 - 1
.github/workflows/docs.yml

@@ -25,4 +25,4 @@ jobs:
         run: |
           pip3 install pydoctor
       - name: Generate docs
-        run: make apidocs
+        run: make apidocs PYDOCTOR_ARGS=--warnings-as-errors

+ 3 - 2
Makefile

@@ -1,9 +1,10 @@
 PYTHON = python3
-RUFF ?= $(PYTHON) -m ruff 
+RUFF ?= $(PYTHON) -m ruff
 SETUP = $(PYTHON) setup.py
 TESTRUNNER ?= unittest
 RUNTEST = PYTHONHASHSEED=random PYTHONPATH=$(shell pwd)$(if $(PYTHONPATH),:$(PYTHONPATH),) $(PYTHON) -m $(TESTRUNNER) $(TEST_OPTIONS)
 COVERAGE = python3-coverage
+PYDOCTOR_ARGS ?=
 
 DESTDIR=/
 
@@ -61,7 +62,7 @@ coverage-html: coverage
 .PHONY: apidocs
 
 apidocs:
-	$(PYTHON) -m pydoctor --intersphinx http://urllib3.readthedocs.org/en/latest/objects.inv --intersphinx http://docs.python.org/3/objects.inv --docformat=google dulwich --project-url=https://www.dulwich.io/ --project-name=dulwich
+	$(PYTHON) -m pydoctor $(PYDOCTOR_ARGS) --intersphinx https://www.dulwich.io/api/objects.inv --intersphinx http://docs.python.org/3/objects.inv --docformat=google dulwich --project-url=https://www.dulwich.io/ --project-name=dulwich
 
 fix:
 	ruff check --fix .