From 2554e7ab35484c019c5306980b4d223d96245f25 Mon Sep 17 00:00:00 2001 From: Eksperimental Date: Fri, 9 May 2025 21:00:03 -0500 Subject: [PATCH 1/2] Introduce DOCS_OPTIONS env variable to Makefile Usage: DOCS_OPTIONS="--warnings-as-errors" make docs DOCS_OPTIONS="--warnings-as-errors --formatter html" make docs --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 44e3ff1d9a2..24d02701acc 100644 --- a/Makefile +++ b/Makefile @@ -187,7 +187,7 @@ clean_elixir: #==> Documentation tasks SOURCE_REF = $(shell tag="$(call GIT_TAG)" revision="$(call GIT_REVISION)"; echo "$${tag:-$$revision}") -DOCS_COMPILE = CANONICAL=$(CANONICAL) bin/elixir ../ex_doc/bin/ex_doc "$(1)" "$(VERSION)" "lib/$(2)/ebin" --main "$(3)" --source-url "https://github.com/elixir-lang/elixir" --source-ref "$(call SOURCE_REF)" --logo lib/elixir/pages/images/logo.png --output doc/$(2) --canonical "https://hexdocs.pm/$(2)/$(CANONICAL)" --homepage-url "https://elixir-lang.org/docs.html" $(4) +DOCS_COMPILE = CANONICAL=$(CANONICAL) bin/elixir ../ex_doc/bin/ex_doc "$(1)" "$(VERSION)" "lib/$(2)/ebin" --main "$(3)" --source-url "https://github.com/elixir-lang/elixir" --source-ref "$(call SOURCE_REF)" --logo lib/elixir/pages/images/logo.png --output doc/$(2) --canonical "https://hexdocs.pm/$(2)/$(CANONICAL)" --homepage-url "https://elixir-lang.org/docs.html" $(DOCS_OPTIONS) $(4) DOCS_CONFIG = bin/elixir lib/elixir/scripts/docs_config.exs "$(1)" docs: compile ../ex_doc/bin/ex_doc docs_elixir docs_eex docs_mix docs_iex docs_ex_unit docs_logger From 0fde496a6cae3e54ece0cac33db36327306ed53a Mon Sep 17 00:00:00 2001 From: Eksperimental Date: Fri, 9 May 2025 21:01:53 -0500 Subject: [PATCH 2/2] CI: build does using --warnings-as-error ExDoc flag --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32651087494..c610a62c549 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: ../elixir/bin/mix do local.rebar --force + local.hex --force + deps.get + compile cd ../elixir/ git fetch --tags - make docs + DOCS_OPTIONS="--warnings-as-errors" make docs - name: Check reproducible builds if: ${{ matrix.deterministic }} run: |