fleetlint Policy for a fleet of repositories
v0.3
Getting started

deps/forks-documented

Forked or patched dependencies are documented

Severityinfo
Tiers1, 2
Stacksany
Scoperoot
Kindexpr
Sourcelibrary v0.0.0-20261011205826-ecb4e9b3ffd4
Selected byfleetlint-recommended@0.1.0

Requirement

Every dependency taken from a fork or patched locally (go.mod replace, Cargo [patch], a git URL in package.json or a Python requirement) is documented: upstream, base version, what changed and why. A FORKS.md (root or docs/), a Forks section in the README or docs, or an inline comment on each go.mod or requirement line counts.

Why

A fork without a note outlives the reason for it; the next upgrade either drops the fix or keeps the fork forever.

Applies when

grep("go.mod", "^replace\\s").size() > 0 || grep("Cargo.toml", "^\\[patch").size() > 0 || grep("package.json", "\"(github:|git\\+|git://|https://github\\.com/[^\"]+\\.git)").size() > 0 || grep("pyproject.toml", "@ ?git\\+").size() > 0 || grep("requirements*.txt", "git\\+").size() > 0

Check

exists("FORKS.md") || exists("docs/FORKS.md") || exists("docs/forks.md") || grep("README.md", "^#+ .*\\b(forks?|vendored|patched|patches)\\b").size() > 0 || grep("docs/**/*.md", "^#+ .*\\b(forks?|vendored|patched|patches)\\b").size() > 0 || (grep("go.mod", "^replace\\s([^/]|/[^/])*$").size() == 0 && grep("Cargo.toml", "^\\[patch").size() == 0
    && grep("package.json", "\"(github:|git\\+|git://|https://github\\.com/[^\"]+\\.git)").size() == 0
    && grep("pyproject.toml", "@ ?git\\+[^#]*$").size() == 0 && grep("requirements*.txt", "git\\+[^#]*$").size() == 0)

Fix

Add docs/FORKS.md listing each forked or patched dependency with upstream, base version, the change and why, or comment each replace line.

Agent instruction: Document each forked or patched dependency (upstream, base version, change, reason) in docs/FORKS.md; ask the user for the reason where the history does not say.

See: https://fleetlint.org/baseline/#dependencies


Generated by fleetlint docs from catalog v0.0.0-20261011205826-ecb4e9b3ffd4.