# Deprecations

When your code deprecates a public name, your docs should say so and point to what replaces it. Rimfe checks this without an AI model.

## What counts as deprecated

A name is deprecated when its code says so: a JSDoc `@deprecated` tag, Python `warnings.warn(..., DeprecationWarning)` or `.. deprecated::`, a Rust `#[deprecated]` attribute, a Java or Kotlin `@Deprecated` annotation, a Go `// Deprecated:` comment, any other attribute, decorator or annotation named deprecated or obsolete, a deprecated Python CLI option, or `deprecated: true` in an OpenAPI or JSON Schema file. When the marker gives a version or date, Rimfe reads it: `since`, and a removal such as "removed in 3.0", "will be removed on 2027-01-01" or `forRemoval = true`.

Generated files are skipped. A file whose leading comment says a tool wrote it ("Generated by", `@generated`, "DO NOT EDIT", or `wrangler types` output) is the tool's or a vendor's API, not yours, so its deprecations are not listed. The same goes for a `@deprecated` tag inside a `declare module` block for a package, such as `declare module "acme-sdk"`. A block for one of your own relative files, such as `./client`, still lists its deprecations.

## Two findings

| Finding | When |
| --- | --- |
| Deprecated name in the docs | A docs section uses a name the code deprecates and does not say it is deprecated near the mention. The finding quotes the line and gives the code location of the marker. |
| Undocumented deprecation | A pull request deprecates a public name and no docs section that mentions it has a deprecation notice. It points at the pages that mention the name, or at your migration or upgrade page when none does. |

A section counts as marked when "deprecated", "deprecation", "removed in", "will be removed" or similar words appear in its heading, at its top or within a few lines of the mention. On a pull request, a deprecated name in the docs is reported only for lines the pull request added. Audits report every one.

To silence a name, add it to [`referenceIgnore`](https://docs.rimfe.com/configuration/rimfe-json#ignore-reference-names).

## The Deprecations list

The repository **Overview** lists the names the code marks deprecated, one row per name: name, since, removal, and **Docs notice**, which reads **In the docs** when a docs section documents the deprecation and **Missing** when none does. For a missing notice, mark the name deprecated in the sections that mention it and say what replaces it; the next index refresh picks it up. Under the name is every file that declares it, with its line; each links to the declaration on GitHub when the indexed commit is known. A name whose removal date has passed and that is still in the code shows **Overdue**. The list is for reading; nothing acts on it.
