|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
This file is the authoritative reference for the project's source-code citation rules. The short form lives in CLAUDE.md.
Comments must not reference other files in this repository by <file>:<line> (e.g. libs/ra8_hal/src/ra8_drw.c:776). Line numbers go stale the moment any agent reformats or edits the target file, and they are not searchable – a reader cannot grep for :776 and find anything useful.
Use the function or symbol name instead:
The pre-commit gate scripts/checks/check_line_citations.py enforces this rule strictly: any new in-tree <file>:<line> reference inside a C/C++ comment, Markdown doc, or plain-text doc is rejected at commit time. The // CITES-OK: <reason> per-line marker is the only opt-out.
Every HAL register access, ISR, and driver path must cite the source of truth so a future reader can verify the implementation against the spec without guessing. Acceptable forms:
References to anything under docs/reference/ (the committed PDFs), libs/third_party/, or apps/shared_libs/third_party/ (SOUP) are exempt from rule 1 – those line numbers belong to artifacts we do not edit.
In rare cases an in-tree line citation is the right call (e.g. a historical migration note describing exactly which old line moved where). Add // CITES-OK: <reason> to that line; the gate skips any line containing a non-empty reason after the marker.
CHANGELOG-style "moved from <file>:NNN to ..." snippets are also exempt automatically.