citation-cff-current (TN106)#

Group

Default severity

Metadata

Error

A technote repository can publish its citation to GitHub through a CITATION.cff file, which Documenteer generates from technote.toml (see Generating a CITATION.cff). That file is fully managed: documenteer technote sync-cff regenerates it from scratch on every run, deterministically and offline. This rule regenerates it in memory and compares it with the file on disk, so a technote.toml edit that was never synced is caught before the stale citation is published.

The comparison is the one documenteer technote sync-cff --check runs, so the linter and that check never disagree about whether a file is stale.

A repository with no CITATION.cff is not flagged. Adopting the file is opt-in per repository: an absent file means the repository has not asked for one, not that it is missing something.

Example of a failing technote#

A title is added to technote.toml, but CITATION.cff still carries the old one:

technote.toml#
[technote]
id = "SQR-000"
title = "The LSST DM Technical Note Publishing Platform"
[TN106] CITATION.cff is out of date with technote.toml. Run 'documenteer technote sync-cff' to regenerate it.

How to fix it#

Regenerate the file:

documenteer technote sync-cff

Commit the result alongside the technote.toml change that caused it. Edit technote.toml, never CITATION.cff — a hand-edit to the generated file is what this rule reports, and it is lost on the next sync.

To keep the two in step without remembering the command, add Documenteer’s technote-sync-cff pre-commit hook to the repository; it rewrites CITATION.cff whenever technote.toml is staged. See the pre-commit hook for the configuration.

If the repository no longer wants a CITATION.cff at all, delete the file: an absent file passes.

Note

Documenteer generates CITATION.cff from a technote’s own metadata, so a finding can also appear after a Documenteer upgrade that changes what is generated. Running the command resolves it the same way.

See also#

  • Generating a CITATION.cff — what is generated, and how each field is read from technote.toml.

  • TN001technote.toml does not conform to the schema, which is how a doi that is not a DOI is reported. Such a file cannot be parsed into metadata at all, so this rule stays silent until it is fixed.