checkexperimentkeys

command
v2.39.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

checkexperimentkeys

checkexperimentkeys validates experiment keys explicitly named in Markdown under docs/ against codersdk.ExperimentsKnown. It runs as make lint/check-experiment-keys, which is part of make lint.

Recognized forms

The check only recognizes explicit enablement examples:

  • --experiments=<key>
  • CODER_EXPERIMENTS=<key>
  • comma-separated key lists in either form, such as --experiments=key-one,key-two
  • single- or double-quoted values, such as CODER_EXPERIMENTS="key-one"
  • shell line continuations that start with one of the forms above

It deliberately does not try to infer bare identifiers from prose. The placeholder values *, the documented illustrative pair feature1 and feature2, and any angle-bracketed value such as <experiment-key> or <key> are ignored. Other featureN values are checked so a real stale key is not treated as a placeholder.

Directory symlinks are not traversed. This keeps a directory scan contained to the explicitly supplied tree and prevents a documentation checkout from silently scanning Markdown outside it. A Markdown file supplied directly is still scanned according to normal file access rules.

Usage

$ go run ./scripts/checkexperimentkeys        # scans docs/
$ go run ./scripts/checkexperimentkeys path/to/file.md path/to/dir

Documentation

Overview

Command checkexperimentkeys validates experiment keys named in documentation.

The check recognizes only explicit enablement forms: --experiments=<key-list> and CODER_EXPERIMENTS=<key-list>, where a key list is comma-separated. It deliberately does not infer bare identifiers from prose, which would make the check susceptible to false positives. Matching single- or double-quoted values are accepted. Placeholders are *, the documented feature1 and feature2 illustrative pair, and any angle-bracketed value.

Usage:

checkexperimentkeys [path ...]

With no arguments it scans docs/. Arguments may be files or directories.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL