Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Duplication

Question: Does one section state everything the other states, or do the two give different values or instructions for the same thing?

  • Runs: when selected: --rule duplication, --rule documentation or --rule all · Fails the check by default: no
  • Right on projects JevGate was never tuned on: considers 15% (3 of 20) (how it is measured)
  • Right on the projects it was tuned on: considers 23% (5 of 22)
  • Looks at: sections of different agent instruction files and project docs that share much of their wording
  • Evidence unit: one candidate pair of sections
  • Acceptable: Sections on the same subject where each adds something
  • Names: documentation/duplication, duplication, doc_duplication · Version: 4

When a finding is right

A finding says one section states everything another states, or that two sections give different values or instructions for the same thing. It is right when two documents disagree about a command or a version, or when a copy will drift from the page it repeats. It is wrong when the repetition is what the reader needs where they are: an index entry summarizing the page it links, a pointer to the canonical page, or the template every API reference page follows. Nearly half of the findings labeled wrong or debatable were READMEs that repeat the documentation’s home page.

A translation is not a duplicate: two documents in different languages are asked only whether they disagree.

Findings it got wrong

Labeled wrong by reading the code, on open-source projects the rules were tuned on.

Ktor samples: the sample index

  • Where: README.md:16 in ktorio/ktor-samples at 1c9df7c.
  • Finding (consider): Section Applications states everything section Postgres sample for Ktor Server of postgres/README.md states.
  • Why it was wrong: The overlap is one sentence: the root README gives each sample a one-line summary and links its README, whose introduction repeats that summary before its own steps. An index entry summarizing the page it links is the point of an index, and each sample’s README must stand alone, since each sample is a separate Gradle project.
  • Since: not addressed; reported the same way from 0.20.0 through 0.25.0.

Zustand: middleware reference pages

  • Where: docs/reference/middlewares/combine.md:40 in pmndrs/zustand at b57db4f.
  • Finding (consider): Section Parameters states everything section Parameters of docs/reference/middlewares/immer.md states. The same text recurs in 1 more section.
  • Why it was wrong: combine.md, immer.md and subscribe-with-selector.md follow the same API reference template, and each documents its own function’s parameters. A shared partial would leave each API’s page incomplete.
  • Since: not addressed; reported the same way from 0.19.0 through 0.25.0.