All rules

One term defined differently in different files

cross-doc-duplicate-definitionon by defaultJapanese / English

The same term defined in other words in different files

Example

Flagged
# Getting started "Member" means a person who pays the fee.
What chaff prints
3:1 "Member" is defined in other words than in 2 other files checked with it (as in a.md)
Fixed
# Getting started "Member" means a person invited to a workspace.
What chaff prints
no finding
The file checked together with it (a.md). The flagged and the fixed text are each compared with it
# Glossary "Member" means a person invited to a workspace.

How to fix

Keep the definition in one place (the glossary, the main agreement) and refer to it from the other files. If the meaning is meant to differ, use a different term.

Why it matters

A bundle of contracts or a manual often defines the same term in several files (the agreement and its schedule, the glossary and the pages). When one is changed later and the other is not, the files disagree on what the term means. Across the files given together, the words after the term in each definition ("X" means …, 「X」とは、…をいう) are compared, and a file that defines the term in other words than most files do is pointed out. Width, spaces and the punctuation at either end do not count. Whether two wordings mean the same is not something a machine can decide, so chaff only shows where to look.

What it does not flag

Definitions limited to a part ("In this section, X means") and those that give the meaning before the term ('(the "Vendor")') are not compared. A file that defines a term twice is compared by its first definition (duplicate-definition reports the second). Definitions that differ only in width, spaces or the punctuation at either end are taken as the same.

Turning it off or relaxing it

Silence this one spot (in the document)
<!-- stet: cross-doc-duplicate-definition — reason -->
Relax it for the team (the reason is kept as a comment in chaff.yaml)
npx chaffjs relax cross-doc-duplicate-definition --why "reason"
Turn it off for the team (chaff.yaml)
rules: cross-doc-duplicate-definition: off
Technical details
Layer
L3
Status
stable
Severity
warning
Languages
Japanese and English
Suited to
business, technical, blog, legal, docs, academic, literature, speech
Reads from the document
structure, documents

Levels

Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).

stricterror
normalwarning
relaxedinfo

This rule has no limit to count to. A level sets how a finding is marked: relaxed keeps the finding and marks it a step lower.

By genre

Runs by default in
technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, legal/contract, legal/statute, legal/judgment, legal/patent, docs/manual, docs/faq, docs/glossary, academic/paper, literature/fiction, literature/essay, literature/poetry, literature/play, speech/address, speech/transcript

Genres

Message

"{term}" is defined in other words than in {count} other files checked with it (as in {example})

This page is built from the rule's definition file:packages/chaff/rules/cross-doc-duplicate-definition.yaml