Guide

Testing Doxygen documentation examples

Doxygen builds the reference, not the examples. Compile example files, quote them with snippets, fail on warnings and check pasted code.

Published
Updated
November 17, 2026
Reading time
14 min
Facts checked against
Doxygen docs on configuration, Markdown support, special commands and snippets, plus GCC 14 porting notes, with every code block run on Doxygen 1.16.1, GCC 14 and Python 3 (November 14, 2026)
Outlined documentation pages with a lime pulse line running out of the stack
On this pageThe short answerHow Doxygen builds the referenceWhy examples in Doxygen projects break or go untestedSet up the illustrative projectMake missing snippets fail CIUnderstand the engine's scanCompile the copied C fragmentsTriage the resultWhere DocsAlive fitsThe sources we checkedFAQ

The short answer

Build the Doxygen reference, compile the example sources, and separately check code copied into documentation. Prefer snippets drawn from compiled files, make warnings fail CI at the end of the build, and use plain labels for supported fenced examples. Engine 0.6.3 does not detect Doxygen: DocsAlive scans docs/ plus the root README in the illustrated layout, reports c fences as passing without a check, skips braced labels as text, and never sees snippet contents or header comments. A Doxygen command fails as missing-tool when the tool is absent.

A reference build can succeed while a hand-pasted call is stale. Compiling the file from which a snippet is drawn protects that source, while a fragment check catches copies that have drifted. These checks answer different questions and should be reported separately.

The walkthrough uses Doxygen 1.16.1, GCC 14, and engine 0.6.3. Its files are illustrative, and later changes are broken on purpose to show what each layer catches. See API reference docs testing and documentation drift for the wider maintenance problem.

How Doxygen builds the reference

Doxygen reads the configured INPUT. FILE_PATTERNS and RECURSIVE control which files within that input are read. Markdown files listed as input become pages, and USE_MDFILE_AS_MAINPAGE can put a Markdown file on the main page. Documentation comments in source headers can also contain code blocks bounded by Doxygen's code commands.

Fenced blocks use at least three backticks or tildes. For highlighting, a language's typical file suffix can appear after the fence, including a suffix in braces. When the name starts with a letter, the dot and braces are optional, so a plain py label works. Doxygen's special commands do not work inside code blocks; a snippet command must be outside a block to be processed as a command.

A snippet names a file found through EXAMPLE_PATH and a block identifier. Its marker lines must appear exactly twice, and Doxygen quotes the lines between them without including the markers. This lets a page display part of a file that CI also compiles. It does not by itself compile that file, so the build needs an explicit compilation step.

Warnings are another boundary. WARN_AS_ERROR = NO is the default, so a warning on its own does not change the exit status. YES stops at the first warning; FAIL_ON_WARNINGS continues and returns a nonzero status at the end if warnings occurred. The latter is useful when a CI run should report the build's warnings and still fail.

Why examples in Doxygen projects break or go untested

Doxygen projects usually document C or C++ APIs, and their examples live in more places than a Markdown-only tool expects. Each place has its own failure mode.

Hand-pasted copies drift. A Markdown page or a comment can hold a copy of a call that was correct when it was written. When the API changes, the header, the implementation and the compiled example change with it, but the copy does not. Nothing in the reference build notices.

Snippets track compiled code, but only if the code is compiled and the markers survive. A snippet quotes lines from a file under EXAMPLE_PATH, which is a good way to keep a page honest. If CI never compiles that file, or a marker is renamed, the page can show stale code or lose the quoted lines.

Comments are not pages. Code blocks inside documentation comments in headers are rendered into the API reference, yet a scanner that reads Markdown files never opens a .h file.

The C fence itself has no checker in engine 0.6.3. A c fence is reported as passing without being compiled or parsed, so a pass for that block says nothing about whether the code compiles.

Labels matter. Doxygen accepts a file suffix in braces after the fence, and the engine reads that form as text and skips it. A Python or shell block written that way is never run.

A missing snippet marker is only a warning by default, and GCC 14 makes calls to undeclared functions errors. The first lets a broken page build quietly; the second is what makes a compile check effective.

Set up the illustrative project

The following command installs the Doxygen release used in the probe and places it on the current path:

curl -L -o doxygen.tar.gz https://github.com/doxygen/doxygen/releases/download/Release_1_16_1/doxygen-1.16.1.linux.bin.tar.gz
tar xzf doxygen.tar.gz
export PATH="$PWD/doxygen-1.16.1/bin:$PATH"
doxygen --version

The recorded version was:

1.16.1 (669aeeefca743c148e2d935b3d3c69535c7491e6)

Record the Doxygen and compiler versions in a real CI environment. A missing executable is an environment problem to resolve before interpreting the reference build; it is not evidence that a page's API example is wrong.

This illustrative configuration selects the README, headers, and documentation folder, and makes warnings fail at the end:

PROJECT_NAME           = "acme"
INPUT                  = README.md include docs
RECURSIVE              = YES
FILE_PATTERNS          = *.h *.md
EXAMPLE_PATH           = examples
USE_MDFILE_AS_MAINPAGE = README.md
OUTPUT_DIRECTORY       = build
GENERATE_LATEX         = NO
QUIET                  = YES
WARN_AS_ERROR          = FAIL_ON_WARNINGS

The configuration gives the build several sources with distinct roles. The README becomes the main page, Markdown under docs supplies a usage page, headers supply API comments, and examples provides snippet files. The fact that an example file is available to a snippet does not mean that the configured reference build compiles it.

The illustrative header contains a code example in a documentation comment:

/**
 * @file version.h
 * @brief Version helpers for the acme client.
 */
#ifndef ACME_VERSION_H
#define ACME_VERSION_H

/**
 * @brief Split a release string such as "2.4.1" into three integers.
 *
 * @param text release string
 * @param out  receives major, minor and patch
 * @return 0 on success, -1 if @p text is not three dot-separated numbers
 *
 * \code{.c}
 * int v[3];
 * acme_parse_version("2.4.1", v);
 * \endcode
 */
int acme_parse_version(const char *text, int out[3]);

#endif

A reader can copy that call from the generated API page. If the function is renamed later, the declaration may change while the comment remains unchanged. Doxygen can still render the old text, so the comment needs a check that understands the declaration it calls.

The implementation for the illustrative function is:

#include <stdio.h>
#include "acme/version.h"

int acme_parse_version(const char *text, int out[3]) {
    char extra;
    if (sscanf(text, "%d.%d.%d%c", &out[0], &out[1], &out[2], &extra) != 3) {
        return -1;
    }
    return 0;
}

The complete example program contains a marked region for the snippet:

#include <stdio.h>
#include "acme/version.h"

int main(void) {
    //! [parse]
    int v[3];
    if (acme_parse_version("2.4.1", v) == 0) {
        printf("%d.%d.%d\n", v[0], v[1], v[2]);
    }
    //! [parse]
    return 0;
}

Compiling this file in CI checks the code from which Doxygen draws the snippet. When the API changes, the example must change to compile. The published snippet can then follow the updated file, provided its markers and the Doxygen build remain valid.

The illustrative usage page includes that snippet, a hand-pasted copy, a build command, and a braced Python fence:

# Usage {#usage}

Build and run the example program:

```bash
gcc -Iinclude src/version.c examples/parse.c -o parse
./parse
```

The parsing step, quoted from the compiled example:

\snippet parse.c parse

The same step pasted by hand:

```c
int v[3];
acme_parse_version("2.4.1", v);
printf("%d.%d.%d\n", v[0], v[1], v[2]);
```

A Python check in Doxygen's braced fence style:

~~~{.py}
print(".".join(["2", "4", "1"]))
~~~

The hand-pasted copy is intentionally separate from the example file. It can drift even when the complete example continues to compile. The braced Python label is valid for Doxygen highlighting, but it creates a different parsing result for engine 0.6.3, as the scan below shows.

The illustrative README is the main page and contains a command for building the reference:

# acme

C helpers for acme release strings. Build the reference with:

```bash
doxygen
```

Build the reference:

doxygen

The build completed successfully without warnings. The usage page showed the snippet lines, hand-pasted C, and Python block; the header page showed the code from the documentation comment. The example program's recorded output was:

2.4.1

A reviewer should inspect both the generated page and the source that produced it. The build demonstrates that the configured inputs were processed without warnings in this probe. The separate compile-and-run command exercises the example program. Neither automatically validates the hand-pasted fragment or header comment.

Make missing snippets fail CI

The following change is broken on purpose: the named marker does not exist in the example file.

-\snippet parse.c parse
+\snippet parse.c parse-step

With FAIL_ON_WARNINGS, Doxygen exited with status 1. The recorded message was:

docs/usage.md:12: error: block marked with [parse-step] for \snippet should appear twice in file parse.c, found it 0 times

With WARN_AS_ERROR = NO, the same problem was a warning, the exit status was zero, and the page was built without the quoted lines. That makes warning policy part of example coverage. A successful default build can otherwise leave readers with a missing sample.

Use exactly two markers for each selected block and compile each file in EXAMPLE_PATH in CI. The marker check establishes that Doxygen can select the requested region; compilation establishes that the source meets the compiler's checks. Inspect the resulting page when changing snippet boundaries so the displayed region remains useful and self-contained for readers.

Understand the engine's scan

The following command plans a scan of the illustrative repository:

docsalive scan .

The default invocation plans rather than executes. The engine treated the project as plain Markdown and collected docs/ plus the root README: two pages and four blocks. When run, the usage-page shell block passed on the box where GCC was installed. The c fence was reported as passing without being compiled or parsed. In a separate probe, a c fence holding text that is not C at all also passed, which shows the known limitation plainly.

The braced Python label was read as text and skipped as not executable. The snippet command was prose to the engine, so its quoted code was never seen. The header comment was never read because .h files are not scanned as pages. The README's Doxygen command passed where Doxygen was on the path and failed as missing-tool where it was absent.

Doxygen item What Doxygen does What the engine does in 0.6.3
Markdown under configured input Builds pages according to the configuration Collects Markdown according to plain-project scan rules
Root README as main page Uses it as the configured main page Adds the root README to the docs/ scan when present
Snippet and markers Inserts lines between the two markers from an example file Reads the command as prose and does not retrieve the lines
Header documentation comment Builds API documentation including the code block Never reads the header as a page
c fence Displays highlighted code Reports pass without running, compiling, or parsing it
Braced Python label Highlights the code Reads the label as text and skips it
Plain py label Highlights the code Recognizes and runs supported Python
Doxygen build command Runs the configured reference build Needs the tool in the page environment; otherwise reports missing-tool

A pass for an unknown label is not proof of a check. This applies to c and other labels outside the engine's language map in this release. Record the coverage gap rather than counting such a result as a successful compilation.

The following tested change uses a plain Python label. Doxygen still rendered the block, and the engine ran it as Python:

-~~~{.py}
+```py
 print(".".join(["2", "4", "1"]))
-~~~
+```

Use plain labels for supported Python and shell blocks when both Doxygen and the scan need to recognize them. This change improves extraction for those blocks; it does not add a C checker or cause the engine to read header comments.

Compile the copied C fragments

The following illustrative script checks C fences in docs/ and the README, plus braced C code blocks in headers. It uses gcc -fsyntax-only and wraps fragments without a main function with a project-specific prelude.

"""Compile the C examples a docs scan cannot check: c fences in Markdown and code blocks in headers."""
import re
import subprocess
import sys
import tempfile
from pathlib import Path

FENCE = re.compile(r"^```c\n(.*?)^```", re.M | re.S)
CODE = re.compile(r"\\code\{\.c\}\n(.*?)\\endcode", re.S)
PRELUDE = '#include <stdio.h>\n#include "acme/version.h"\nvoid doc_example(void) {\n'


def blocks():
    for page in sorted(Path("docs").rglob("*.md")) + [Path("README.md")]:
        for m in FENCE.finditer(page.read_text()):
            yield f"{page}:{page.read_text()[:m.start()].count(chr(10)) + 1}", m.group(1)
    for header in sorted(Path("include").rglob("*.h")):
        text = header.read_text()
        for m in CODE.finditer(text):
            body = re.sub(r"^\s*\* ?", "", m.group(1), flags=re.M)
            yield f"{header}:{text[:m.start()].count(chr(10)) + 1}", body


failed = 0
for where, code in blocks():
    source = code if "main(" in code else PRELUDE + code + "\n}\n"
    with tempfile.NamedTemporaryFile("w", suffix=".c") as f:
        f.write(source)
        f.flush()
        result = subprocess.run(["gcc", "-fsyntax-only", "-Iinclude", f.name],
                                capture_output=True, text=True)
    status = "ok" if result.returncode == 0 else "FAILED"
    failed += result.returncode != 0
    print(f"{status} {where}")
    for line in result.stderr.splitlines():
        if "error:" in line:
            print("   ", line.split("error:", 1)[1].strip())
sys.exit(1 if failed else 0)

Run the check from the project root:

python3 tools/check_c_examples.py

Before the rename shown below, the recorded result was:

ok docs/usage.md:16
ok include/acme/version.h:15

This is a syntax and declaration check, not a run: wrapped fragments are never executed. It recognizes only the specified C fences and code blocks written with the braced C label. It does not cover C++ blocks, include commands, or snippet sources. Compile the files in examples/ separately in CI; the usage-page shell block already does so for this example.

The prelude is hard-coded to this project's header, and the script reads headers only under include/. Adapt and review those assumptions before using it elsewhere. A fragment that needs different declarations or setup may require its own complete test program.

Show hand-pasted drift

The following rename is broken on purpose for the documentation copies. The header, implementation, and complete example are updated, but the hand-pasted fence and header comment are not:

-int acme_parse_version(const char *text, int out[3]);
+int acme_version_parse(const char *text, int out[3]);

Doxygen still exited successfully with FAIL_ON_WARNINGS, and the updated complete example still built and printed the expected version. The engine still reported the C fence as passing without a check. The fragment check exited with status 1:

FAILED docs/usage.md:16
    implicit declaration of function ‘acme_parse_version’ [-Wimplicit-function-declaration]
FAILED include/acme/version.h:15
    implicit declaration of function ‘acme_parse_version’ [-Wimplicit-function-declaration]

GCC 14 treats implicit function declarations as errors, so the stale calls are caught when compiled against the updated header. The snippet drawn from the updated complete example tracks the change; the copied examples require separate maintenance. Prefer a snippet when the displayed code can reasonably come from a maintained, compiled file.

Triage the result

Finding Likely cause What to do
Missing snippet marker The identifier or source markers changed Restore exactly two matching markers and rerun Doxygen with warnings failing CI
C fence reports pass The label has no engine checker Run the dedicated compile check; do not treat the pass as compilation
Braced Python block is skipped The engine reads the braced info string as text Use a plain supported label and verify the rendered page
Header example is absent from the scan Header files are not scanned as pages Compile the comment fragment or cover it with a maintained example
Doxygen command reports missing-tool Doxygen is absent from the page environment Provide the documented tool in the intended environment and rerun
Example source compiles but a pasted call fails The copy drifted after an API change Update the copy or replace it with a snippet from compiled source
Reference builds but content is missing A warning did not fail the build, or the selected region changed Review warning policy and inspect the generated page

A practical CI plan keeps the checks layered: build Doxygen with FAIL_ON_WARNINGS, compile every example file used through EXAMPLE_PATH, run complete programs where appropriate, and compile copied fragments against the current headers. Scan supported Markdown examples as an additional signal, then review unsupported and skipped blocks.

Use this checklist when changing the API or reference:

[ ] Record Doxygen and compiler versions used in CI.
[ ] Review INPUT, FILE_PATTERNS, RECURSIVE, and main-page selection.
[ ] Compile every example file used through EXAMPLE_PATH.
[ ] Keep each snippet marker present exactly twice.
[ ] Build with WARN_AS_ERROR set to FAIL_ON_WARNINGS.
[ ] Inspect generated pages after changing snippets or labels.
[ ] Prefer snippets from compiled files over hand-pasted copies.
[ ] Use plain supported labels for Python and shell fences.
[ ] Run the project-specific C fragment compile check.
[ ] Review missing-tool, skipped, and unchecked-language findings.

Where DocsAlive fits

DocsAlive can run supported fenced examples in the collected Markdown pages and classify results such as a missing tool. It cannot establish C correctness from a c fence in engine 0.6.3, retrieve snippet contents, or inspect header comments. Keep those gaps covered by the compiler and Doxygen build. Every plan runs the scan on a schedule, and the Team plan and above add pull request checks and draft fix pull requests; pricing lists what each plan includes. To see a real report on a public repository you maintain, use the health check.

The CLI reference describes scan scope and setup, while findings explains categories to review. Similar source-boundary issues arise when Hexo assembles code through tags and when pdoc publishes docstrings. In each case, identify what readers see and how that material reaches a test before interpreting the report.

The sources we checked

The following sources were read on November 14, 2026. Engine behavior was checked against engine 0.6.3 on the same day.

Source What it covers
Doxygen Markdown support Markdown pages and fenced code labels
Doxygen commands Code and snippet commands and marker requirements
Doxygen configuration Inputs, example paths, main page, and warning policy
Doxygen documentation blocks Documentation comments
GCC 14 porting notes Errors for implicit function declarations

FAQ

Does DocsAlive detect Doxygen or compile C fences?

Engine 0.6.3 does not detect Doxygen. In the illustrated layout it scans docs and the root README, reports c fences as passing without a check, skips braced labels as text, and does not see snippet contents or header comments. A Doxygen command reports missing-tool if Doxygen is absent.

Why can a Doxygen build pass with a broken example?

The build renders documentation; it does not necessarily compile a hand-pasted example. A stale call can remain in a page or comment after the implementation changes.

Why compile files used by snippets?

A snippet displays lines from a source file. Compiling that file in CI checks the maintained source, while the Doxygen build checks that the requested marker can be found.

What happens when a snippet marker is missing?

With the default warning policy, Doxygen can build the page and exit successfully after warning. FAIL_ON_WARNINGS lets the build finish and returns a nonzero status when warnings occurred.

Does the fragment script run the examples?

No. It performs a syntax and declaration check with GCC. Its project-specific prelude and limited file patterns mean other examples need separate checks.

Why use a plain Python fence label?

Doxygen accepts the plain label, and engine 0.6.3 recognizes it as Python. A label beginning with a brace is instead read as text and skipped by that engine.

Keep reading
Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs Testing: How to Test the Code Samples in Your Docs

Why code examples in documentation break, the ways teams test them (doctest, docs-as-tests, CI runners) and how to run every sample on each release.

Two lenses held over the same documentation page, each bringing a different layer into focusComparison

Vale vs markdownlint: What Each Docs Linter Catches

Vale checks prose style; markdownlint checks Markdown structure. What each catches, sample configs, running both in CI and what neither one tests.

Blueprint of two documentation pages: one with a handwritten test script, one whose code blocks are framed and checkedComparison

Doc Detective vs DocsAlive: Testing the Code in Your Docs

Doc Detective is a free, open-source docs-as-tests framework; DocsAlive is a hosted docs CI for code examples. Features, price, setup and when to use each.

A machine blueprint above a ruled documentation page, with a caliper measuring between themComparison

Promptless Alternative: Promptless vs DocsAlive Compared

Promptless drafts docs updates from what you ship; DocsAlive runs the code examples you've published. Features, pricing, security and when to use each.

A long workbench of outlined testing instruments, each with a small lime light, beside a stack of documentation pagesGuide

Best Free Tools to Test Code Examples in Documentation

Free, open-source tools that run the code examples in your docs: rustdoc, Go examples, doctest, pytest plugins, Sphinx doctest, Doc Detective and byexample.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing SDK Docs Before Every Release: A Release-Gate Guide

Test SDK and client-library docs against the package you ship: build the wheel or npm tarball, install it clean, run every example, and gate the release in CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

How to Test Quickstarts and Tutorials in Your Docs

Test the onboarding path a new reader follows: run quickstarts in a clean environment, in page order, sort real bugs from credentials and fragments, and wire it into CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

How to Test CLI Documentation: Commands, Flags and Output

Test the commands a CLI page promises: install in a clean container, run examples in order, compare flags with --help, check exit codes and output, and run it in CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

How to Test API Reference Docs: Requests, Responses and SDKs

Test API reference pages against the contract they publish: methods, parameters, request and response examples, SDK snippets, status codes and OpenAPI samples.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for API-first companies

Keep API quickstarts, SDK snippets and curl examples working across releases.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for CLI and developer-tool vendors

Test developer-tool install paths, package managers and command examples across releases.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing README Code Examples: Install, Usage and CI

Keep README install commands and usage examples working with clean environments, output checks and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Notebooks and Executable Docs: Cells, Kernels and Output

Test notebooks in fresh kernels, check meaningful output and manage dependencies, data and drift in CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Docs in GitHub Actions: Pull Requests and Scheduled Checks

Run documentation example checks in GitHub Actions with practical guidance on schedules, path filters, caching, secrets and reports.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Code Examples in MkDocs, Docusaurus and Sphinx Sites

Find and test documentation examples in Markdown, MDX and reStructuredText, alongside site builds and link checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Python Docs Testing: Doctest, Pytest and Markdown

Test Python documentation with doctest, pytest, Markdown example execution and isolated environments.

Outlined documentation pages with a lime pulse line running out of the stackGuide

JavaScript Docs Testing: Node, TypeScript and Modules

Test Node and TypeScript documentation examples across module formats, package versions and type checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Go documentation examples

Test Go example functions and Markdown snippets against the intended module versions in clean environments.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Sphinx Docs Testing: doctest, code-block and MyST

Test Sphinx documentation examples: what the doctest and linkcheck builders prove, code-block and literalinclude, MyST fences, and what a Markdown scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

ReadMe Docs Testing: CLI, OpenAPI and Code Examples

Test ReadMe documentation examples: docs-as-code and bi-directional sync, what lint and oas:validate prove, Tabs variants and runnable code.

Outlined documentation pages with a lime pulse line running out of the stackGuide

TypeScript Docs Testing: tsc --noEmit and Runtime

Test TypeScript documentation examples: type-check snippets with tsc --noEmit in a consumer project, then run them, and what each check proves.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docusaurus Docs Testing: Code Blocks, Tabs and MDX

Test Docusaurus documentation examples: builds vs runnable code, code block metadata, Tabs install variants, MDX pages and clean-container runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Mintlify Docs Testing: CodeGroup, Tabs and the CLI

Test Mintlify documentation examples: docs.json, MDX pages, CodeGroup and Tabs variants, what mint broken-links and mint validate prove, and clean runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

MkDocs Docs Testing: Code Examples, Tabs and Snippets

Test MkDocs documentation examples: strict builds, Material tabs, Snippets includes, mkdocstrings pages and clean-container runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Installation Instructions: pip, npm and Containers

Test documented install steps in clean environments: pip and extras, venv, npm install vs npm ci, containers and the first import.

Outlined documentation pages with a lime pulse line running out of the stackGuide

AI SDK Docs Testing: LLM Examples, Keys and Drift

Test AI and LLM SDK documentation examples: requests, responses, streaming, tool calls, credentials, model retirements and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing migration guides and changelog examples

Test before and after examples against the right releases and make migration documentation part of the release gate.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs Testing Checklist: Code Examples Before Release

A practical pre-release checklist for testing documentation examples, reviewing gaps and verifying published packages.

Outlined documentation pages with a lime pulse line running out of the stackGuide

The Cost of Broken Code Examples in Documentation

Understand how broken documentation examples create friction in developer adoption and support, and how to reduce it.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Rust documentation examples

Test Rust rustdoc examples and cargo documentation tests, and keep native Rust checks because compiled Rust fences are recognized but not executed.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing VitePress documentation examples

Test VitePress Markdown examples separately from the site build, including code groups, includes and what a plain Markdown scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing docs in GitLab CI

Run documentation example checks in GitLab CI jobs, keep site builds separate from execution, and review what a scan covers and skips.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing JSON, TOML and YAML examples in docs

Test JSON, TOML and YAML config examples in documentation: parse, schema and tool checks, honest fence labels, fragments, CI jobs and what a scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Java documentation examples

Test Java examples in READMEs, SDK docs and Javadoc: the source launcher, javac, JShell scripts, assertions, @snippet files, CI and what a scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing PHP documentation examples

Test PHP examples in docs: php -l lint, clean-directory runs, assertions with zend.assertions, Composer scratch projects, PHPUnit, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing C# documentation examples

Test C# examples in docs: .NET 10 file-based apps, dotnet build with warnings as errors, test projects, XML doc comments, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Ruby documentation examples

Test Ruby examples in docs: ruby -c syntax checks, clean-directory runs, bundler/inline, minitest assertions, YARD examples, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Kotlin documentation examples

Test Kotlin examples in docs: kotlinc runnable JARs and scripts, -Werror, KDoc @sample in compiled source, kotlinx-knit, fence labels, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Swift documentation examples

Test Swift examples in docs: swift scripts, swiftc -typecheck, DocC snippets compiled by swift build, Swift Testing assertions, CI containers and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing curl and HTTP examples in API docs

Test curl examples in API docs: --fail-with-body, status and JSON checks against a local stub, http fences, credentials and what a docs scan checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Astro Starlight documentation examples

Test code examples in Astro Starlight docs: src/content/docs inventory, Tabs and Expressive Code, Markdoc pages, a Node check script, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Nextra documentation examples

Test code examples in Nextra docs: content/ and app/ sources, fence metadata, Tabs and npm2yarn, a Node check script, CI and an honest scan limitation.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for open-source projects

Test the code examples in open-source docs and READMEs: pull requests from forks, release and scheduled checks, contributor guidelines, triage and the Open source plan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for technical writers and docs teams

How technical writers and docs teams test the code examples they publish: docs-as-code checks, style-guide rules, reading a report, routing findings to engineers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for DevRel teams

How developer advocates test quickstarts, tutorials, workshops and sample READMEs: an inventory, a launch and release cadence, reading a report, and honest reporting.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Hugo documentation examples

Test the code examples in Hugo docs: fences with brace options, the highlight shortcode, Docsy tabs, drafts and theme example sites, scan scope and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing GitBook documentation examples

Test the code examples in GitBook docs synced to Git: the space root, code tags, tabs, reusable includes, invisible characters, scan scope and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing SQL examples in documentation

Test SQL examples in docs: run fences in page order on a fresh database, assert results, handle dialects, SQLite STRICT typing, psql ON_ERROR_STOP and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing mdBook documentation examples

Test the code in an mdBook: what mdbook test covers, rust attributes, hidden lines, include directives, untagged output fences and a scan-ready copy for CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Docsify documentation examples

Test the code examples in Docsify docs: embedded code files and fragments, docsify-tabs tab sets, Prism grammars, scan scope and a CI check.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Jekyll documentation examples

Test the code examples in Jekyll docs: include tags, site variables, highlight tags, posts and _site copies, a scan-ready copy and Ruby hooks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Antora and AsciiDoc documentation examples

Test the code examples in Antora docs: example includes, tagged regions, attributes, failing the build on missing includes and a Markdown copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Fumadocs documentation examples

Test the code examples in Fumadocs docs: npm fences and package-manager tabs, tab groups, the Tabs component, includes, pycon highlighting and a scan-ready copy.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing versioned Docusaurus docs

Test every Docusaurus version readers can reach: versioned_docs copies, versions.json, partials, tabs, per-version scans and old-version triage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Read the Docs documentation examples

Test the code examples on a Read the Docs site: .readthedocs.yaml build jobs, a pycon gate, latest and stable versions, Sphinx, MyST and .rst coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Eleventy documentation examples

Test the code examples in Eleventy docs: Liquid pre-processing, global data, include tags, ignored drafts, raw tags and a rendered copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Zola documentation examples

Test the code examples in Zola docs: Tera content templating, raw tags, config values, hide_lines, drafts, blog posts and a scan-ready copy.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Quarto documentation examples

Test the code examples in Quarto docs: executable cells, display-only fences, freeze and _freeze, a CI profile, cell options and a copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Hexo documentation examples

Test the code examples in Hexo docs: posts, drafts, scaffolds, codeblock and include_code tags, a build check and a scan-ready copy.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing pdoc documentation examples

Test the code examples in pdoc docs: doctest for >>> sessions, fenced docstring examples, the README, private items and a copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing TypeDoc documentation examples

Test the code examples in TypeDoc docs: example tags, includeCode regions, project documents, a compiler check of extracted examples and a scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing JSDoc documentation examples

Test the code examples in JSDoc docs: example tags, captions, source patterns, tutorials, a doclet export and a scan-ready copy with assertions.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing docs examples with pre-commit hooks

Check docs code examples with pre-commit: local hooks, files filters, always_run, pass_filenames, SKIP and --no-verify, and what to leave for CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing documentation examples with Deno

Run docs code examples with deno test --doc: JSDoc and Markdown examples, imports, hashbang permissions, ignored blocks and deno check --doc-only.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing documentation examples with Sybil

Test Python docs examples with Sybil and pytest: Markdown parsers, invisible setup, skips, clear-namespace, docstrings and pycon fences a scan can read.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdoc documentation examples

Test the code examples in Markdoc docs: variables in fences, partials, if/else, custom tabs, validate in CI and a scan-ready copy from transform.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown examples with phmdoctest

Test Python examples in README and Markdown files with phmdoctest: sessions, output blocks, directives, --report, generated pytest files and pycon fences.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown code blocks with pytest-markdown-docs

Run Markdown python fences as pytest tests with pytest-markdown-docs: globals hook, fixtures, continuation, notest, retry and pinning the released version.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing command line docs with prysk and Cram

Test CLI docs with prysk and Cram: .t transcripts, exit statuses, (re) and (glob) matches, and generating tests from the console blocks in your Markdown.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Python docstring examples with xdoctest

Run docstring examples with xdoctest: the pytest plugin, google and freeform parsing, permissive output matching, directives, and what it does not check.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing multi-language docs examples with byexample

Test docs examples with byexample: prompt-based language detection, the -l selection, +pass, +skip and timeouts, capture tags, and hidden setup in comments.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown code blocks with mktestdocs

Run Markdown code blocks under pytest with mktestdocs: exact fence labels, memory=True for shared state, bash blocks, custom executors and docstring checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing README code blocks with pytest-codeblocks

Run README and Markdown code blocks with pytest-codeblocks: exact python, sh and bash labels, cont, skip and xfail markers, expected output, and gaps.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown code examples in any language with txm

Test annotated Markdown examples with txm: program, in, out, err, check and exit annotations, TAP output, exact matching, and blocks it never runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Sphinx docs examples with sphinx.ext.doctest

Run Sphinx doctest, testcode and testoutput directives in reStructuredText or MyST pages: groups, hidden setup, global setup and what is never run.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing docs examples that need API keys

Test credential-gated docs examples: honest placeholders, offline stubs and fixtures, live sandbox jobs, CI secrets and fork rules, and how a scan classifies them.

A machine blueprint above a ruled documentation page, with a caliper measuring between themGuide

Documentation Drift: How to Detect It Before Users Do

What documentation drift is, why code examples drift first, and practical ways to detect it: ownership, release checks, link and execution tests.

See which of your code samples still run.

Send us a public repository. Our team runs DocsAlive on its docs and emails you the real report within 2 business days. Free, no signup.