# file | exact text | replacement | what the guard protects (see docs/development.md, "Mutants"); rows of the evidence rules
gwt_lint/rules_evidence.py | for s in _strings(op, NOT_CITED): | for s in [op.get("page") or ""]: | an ark in note text, a reason or a description is read, not only in a citation page
gwt_lint/rules_evidence.py |     return " ".join(unicodedata.normalize("NFC", s or "").split()) |     return fold(s) | a quotation must keep its accents and case: one changed accent is quote-notfound
gwt_lint/rules_evidence.py | unicodedata.normalize("NFC", s or "") | (s or "") | a quotation typed decomposed (NFD) still matches the record
gwt_lint/rules_evidence.py |                 if images and not record_arks: |                 if False: | a quotation with only an image behind it is quote-image, a STOP
gwt_lint/rules_evidence.py |             and r[2].strip()} |             } | a reading row counts only when it names its reader
gwt_lint/rules_evidence.py | out += self._strings_cited(self.by_key[ref], depth + 1) | pass | a note on a citation is checked against that citation's record, not every record
gwt_lint/rules_evidence.py |             for c in self.attaching.get(f"key:{op['key']}", []): |             for c in []: | an event's own citations give the record its placement is checked against
gwt_lint/rules_evidence.py | if ark in self.thin: | if True: | an ark with no saved record is NOREC, exit 2
gwt_lint/rules_evidence.py |         if {"url", "status", "fetched"} <= set(doc): |         if False: | a gwt-fscache entry is read through its .body
gwt_lint/rules_evidence.py |         if isinstance(doc.get("candidates"), list): |         if False: | gwt-read candidate rows are records
gwt_lint/rules_evidence.py | ARK.findall(name) + ARK.findall(first) or urls_in(first) | ARK.findall(name) or urls_in(first) | a transcription binds to the ark on its first line
gwt_lint/rules_evidence.py |                 if rel != "principal" and not (rel == "spouse" and types & {"Marriage", "Family"}): |                 if rel != "principal" and False: | citing a persona who is not the principal is principal-nonprincipal
gwt_lint/rules_evidence.py |  and not (rel == "spouse" and types & {"Marriage", "Family"}) |  | the spouse's persona of a marriage record may be cited for the marriage
gwt_lint/rules_evidence.py |                 if facts and wanted and not facts & wanted: |                 if False: | a record of another event type is principal-event
gwt_lint/rules_evidence.py | claims.add("parent") | pass | a link_child or add_family that makes the record's godparent a parent is role-mismatch
gwt_lint/rules_evidence.py | return {r for i, rs in hits if any(abs(i - j) <= window for j in at) for r in rs} | return {r for i, rs in hits if at for r in rs} | a role word counts only near the persona's name
gwt_lint/rules_evidence.py |         if len(sexes) >= 2 and len(set(sexes)) == 1: |         if False: | two parents of one sex is role-samesex
gwt_lint/rules_evidence.py |             if not is_church: |             if False: | a sacrament on a town is placement-town
gwt_lint/rules_evidence.py |                 if is_church: |                 if False: | a civil event on a church is placement-civil
gwt_lint/rules_evidence.py |         core = _core(c.split()) |         core = [w for w in _core(c.split()) if w not in TITLE_WORDS] | «Santo Cristo» is not «Santísimo Cristo»: titles are part of the dedication
gwt_lint/rules_evidence.py | (not generic or (town and f" {fold(town)} " in hay)) | True | a generic dedication never matches by itself: the town must match too
gwt_lint/rules_evidence.py |     return list(dict.fromkeys(dedication(text, loc) for loc in locales)) |     return [fold(text)] | the locale's abbreviations are written out before churches compare
gwt_lint/rules_evidence.py |                 if quote.strip() and _found(quote, page) and isinstance(ov.get("place"), str): |                 if isinstance(ov.get("place"), str): | an override counts only with a quote that is on the page
gwt_lint/rules_evidence.py |             elif op["op"] == "update_event" and isinstance(op.get("set"), dict) and op["set"].get("place"): |             elif False: | a place an update_event sets is judged too
gwt_lint/cli.py |     ctx = F.Context(ops, tree, cfg, path=args.list, records=args.records or cfg.get("records")) |     ctx = F.Context(ops, tree, cfg, path=args.list, records=args.records) | records in lint.toml is read
gwt_lint/rules_evidence.py |         self._add(rec, self.thin) |         self._add(rec) | the candidate row gwt-read saves beside a record never hides the full record (facts, relationships)
gwt_lint/rules_evidence.py |                         by_id[who]["facts"] |= facts |                         pass | a marriage fact on the Couple relationship backs a marriage
gwt_lint/rules_evidence.py | followlinks=True | followlinks=False | a records folder of symlinks to other record folders is read
gwt_lint/rules_evidence.py |                     self.unread.append(str(p)) |                     raise | one record file of another shape is skipped, not a crash of every rule
gwt_lint/rules_evidence.py | self.ctx = ctx | self.ctx = ctx; load(ctx) | a list that cites no record and quotes nothing needs no saved records (no exit 2)
gwt_lint/rules_evidence.py | NOT_CITED = ("_line", "key", "expect") | NOT_CITED = ("_line", "key") | the old value an update replaces (`expect`) is not cited
gwt_lint/rules_evidence.py | words.setdefault(fold(w), set()).add(role) | words[fold(w)] = {role} | «padre» is a father (es, it) as well as a priest (pt): no locale overwrites another
gwt_lint/rules_evidence.py | return {"Family"} | return set() | a family the list adds takes a spouse's persona, like one in the snapshot
gwt_lint/rules_evidence.py | if ark not in evidence and persona["name"] and role_words(text, persona["name"]): | if False: | a persona named in free text with its role («padrino X <ark>») is role's to judge, not principal-nonprincipal
gwt_lint/rules_evidence.py | if ark not in evidence and persona["name"] | if persona["name"] | a citation page is never excused by role words
gwt_lint/rules_evidence.py | return ev._tree_page("Citation", ref) | return [] | attach_existing of a tree citation cites that citation's page
gwt_lint/rules_evidence.py | if persona["principal"] or not persona["name"]: | if persona["principal"] or not persona["name"] or not set(persona["arks"]) & set(op_arks(op)): | role reads every persona of a cited record, not only the one whose ark is cited
gwt_lint/rules_evidence.py | and any(toks[j] in words and toks[j] != t for j in range(max(0, i - 2), min(len(toks), i + 3)))] | and True] | a surname alone does not name a person: a namesake is not the persona
gwt_lint/rules_evidence.py | if w in ROLE_WORDS and not (n == 1 and w in own): | if w in ROLE_WORDS: | a person's own name is not a role word for him (Peter, Mare)
gwt_lint/rules_evidence.py | ARK.findall(name) + ARK.findall(first) or urls_in(first) | ARK.findall(name) + ARK.findall(first) | a transcription binds to the web address on its first line (a bulletin, an archive viewer)
gwt_lint/rules_evidence.py | if not long and not record_arks: | if not long: | a short span (one to three words) next to a cited record is checked: quote-short
gwt_lint/rules_evidence.py | yield "", False | return | an empty «» next to a cited record is quote-short
gwt_lint/rules_evidence.py | unsaved += [u for u in urls if u not in unsaved] | pass | a quotation from a source with no saved text is NOREC (exit 2), not clean
gwt_lint/rules_evidence.py | elif not _found(q, ev.records.loose if ctx.records else []): | elif False: | a quotation that cites nothing is not matched against unrelated records
gwt_lint/rules_evidence.py | if o["op"] == "add_media" or (o["op"] == "attach_existing" and "media" in (o.get("object") or {})): | if False: | a media on the cited citation makes a quotation image-only: quote-image
gwt_lint/rules_evidence.py | encoding="utf-8-sig", newline="" | encoding="utf-8", newline="" | a readings file saved with a BOM keeps its first row
gwt_lint/rules_evidence.py | mine = overrides.get(Path(ctx.path).name) if ctx.path else None | mine = {k: v for m in overrides.values() if isinstance(m, dict) for k, v in m.items()} | a placement override holds for its own list only, not for an op with the same key in another list
gwt_lint/rules_evidence.py | evidence = pages + [a for k, v in op.items() if k.endswith("reason") | evidence = pages + [a for k, v in op.items() if False | a persona's ark in a link reason is evidence, never excused by role words
gwt_lint/rules_evidence.py | origs = self._origs(ev, arks, need=False) | origs = self._origs(ev, arks) | a sacrament on a town is placement-town even when its cited record is not saved
gwt_lint/rules_evidence.py | if self._tree_citation(r).get("media_list"): | if False: | a media on a tree citation makes a quotation on it image-only
gwt_lint/rules_evidence.py | if op["op"] == "add_media" or any(c == "Media" for c, _ in attach_targets(op)): | if False: | a quotation in an add_media's own description is image-only
gwt_lint/rules_evidence.py | return ARK.findall(str(ev.by_key[ref].get("page") or "")) | return [] | attach_existing of a citation the list adds cites that citation's page
gwt_lint/rules_evidence.py | return ARK.findall(str(op["set"].get("page") or "")) | return [] | an updated citation page is a page: role words never excuse it
gwt_lint/rules_evidence.py | arks += ARK.findall(str((ctx.tree.handles["Citation"].get(c) or {}).get("page") or "")) | pass | an update_event's place is judged against the citations the event already has
gwt_lint/rules_evidence.py | arks += [a for c in ev.attaching.get(evref, []) for a in ev.cited(c)] | pass | an update_event's place is judged against the citations the list hangs on it
gwt_lint/rules_evidence.py | out.append(str(self._tree_citation(ref).get("page") or "")) | pass | a note on a tree citation is checked against that citation's record
gwt_lint/rules_evidence.py | if kind == "ParentChild" and a == persona["id"] and b in heads: | if False: | a parent the index gives no role is still a parent
gwt_lint/rules_evidence.py | self._bind(ARK.findall(doc["url"]) or urls_in(doc["url"]), data.decode("utf-8", "replace")) | pass | a gwt-fscache body that is plain text is a transcription of its address
gwt_lint/rules_evidence.py | if isinstance(doc.get("text"), str) and doc["text"].strip(): | if False: | the text of a gwt-read envelope is a transcription of its address
gwt_lint/rules_evidence.py |                         out += self.bound.get(a, []) |                         pass | a transcription saved for the principal backs a quote cited on another persona of the record
gwt_lint/rules_evidence.py |  or (rel in PARENTS and claims & PARENTS) |  | a father word on a parent of unknown sex is no mismatch
gwt_lint/rules_evidence.py |             if not origs: |             if False: | a church event with no cited record is not placement-parish
gwt_lint/rules_evidence.py |         return [i for i, t in enumerate(toks) if t in words] |         return [] | a one-word name is found in the text
gwt_lint/rules_evidence.py | if not isinstance(c, dict) or c.get("source") not in (None, "familysearch"): | if not isinstance(c, dict): | a candidate row of another source is not a FamilySearch record
gwt_lint/rules_evidence.py | if ark not in evidence and persona["name"] and role_words(text, persona["name"]): | if ark not in evidence and persona["name"] and role_words(text): | a role word must sit next to the persona's name to excuse it
gwt_lint/rules_evidence.py | if facts and wanted and not facts & wanted: | if wanted and not facts & wanted: | a candidate row with no facts gives no principal-event
