fix: cite profile code as path:line

Sixteen prose citations wrote "file fn() lines N-M", a form the pin
tracker never reads, and four had fallen behind their pins. Each is now
a repository path with the span read at the profile's pin, and a test
refuses the untracked form.
This commit is contained in:
Abdessamad Derraz committed 2026-10-17 18:23:21 +02:00
1 parent dce9c6e8f1
commit f036bce930
7 files changed
+43 -15

No files matched your search

+3 -3
View File
@@ -33,9 +33,9 @@ notes: |
ROM cartridges for KOF95 and Ultraman are auto-detected via game database
(db.c) and loaded from system_dir when the corresponding game is running.
BIOS loading: libretro.c retro_load_game() lines 1601-1727.
STV blob table: ctrl/src/stv.c BiosList lines 112-136.
ROM cartridge DB: utils/src/db.c lines 43-45.
BIOS loading: retro_load_game() at yabause/src/libretro/libretro.c:1601-1727.
STV blob table: BiosList at yabause/src/ctrl/src/stv.c:112-136.
ROM cartridge DB: yabause/src/utils/src/db.c:43-45.
Standalone supports MPEG card ROM loading (Video CD card); disabled in
libretro port (mpegpath = NULL in yabause/src/libretro/libretro.c:1578).
+3 -3
View File
@@ -27,9 +27,9 @@ notes: |
(e.g. E480.WAV). Compiled with HAVE_VOICE=1 on most platforms. Optional:
core works without samples, speech is silently skipped.
BIOS loading: libretro.c load_bios() lines 145-212.
BIOS selection: libretro_core_options.h lines 52-64.
Voice loading: voice.c init_voice() lines 38-79, called from libretro.c:1060-1067.
BIOS loading: load_bios() at libretro.c:150-229.
BIOS selection: libretro_core_options.h:52-64.
Voice loading: init_voice() at src/voice.c:39-91, called from libretro.c:1060-1067.
files:
- name: "o2rom.bin"
+4 -4
View File
@@ -29,10 +29,10 @@ notes: |
All BIOS files are exactly 1 MB (1048576 bytes) except 3do_arcade_saot.bin (512 KB)
and panafz1-kanji.bin (933636 bytes).
BIOS definitions: libopera/opera_bios.c BIOSES[] lines 3-136.
BIOS loading: opera_lr_opts.c opera_lr_opts_set_bios() lines 239-270.
Font loading: opera_lr_opts.c opera_lr_opts_get_font() lines 274-293,
opera_lr_opts_set_font() lines 297-328.
BIOS definitions: BIOSES[] at libopera/opera_bios.c:3-136.
BIOS loading: opera_lr_opts_set_bios() at opera_lr_opts.c:283-315.
Font loading: opera_lr_opts_get_font() at opera_lr_opts.c:319-338,
opera_lr_opts_set_font() at opera_lr_opts.c:342-373.
Core option: libretro_core_options.c opera_bios / opera_font.
files:
+1 -1
View File
@@ -26,7 +26,7 @@ notes: |
(src/d_main.c:1109-1110), so the file is technically optional but expected
for correct rendering of menus, HUD digits, and extended features.
File search order (libretro.c I_FindFile, line 1742):
File search order (I_FindFile, libretro/libretro.c:4176-4252):
1. WAD directory (same folder as the loaded game WAD)
2. system/prboom/ subdirectory
3. system/ directory directly
+2 -2
View File
@@ -29,8 +29,8 @@ notes: |
ROM cartridge and MPEG card ROM loading disabled in libretro port
(cartpath = empty, mpegpath = NULL).
BIOS loading: libretro.c retro_load_game() lines 1048-1069.
Core load: memory.c LoadBios() line 1353, T123Load() memory.h lines 219-280.
BIOS loading: retro_load_game() at yabause/src/libretro/libretro.c:1048-1071.
Core load: LoadBios() at yabause/src/memory.c:1353-1356, T123Load() at yabause/src/memory.h:219-289.
files:
- name: "saturn_bios.bin"
+2 -2
View File
@@ -28,8 +28,8 @@ notes: |
ROM cartridge loading, SH1 ROM (CD Block LLE), and MPEG card ROM are
standalone-only features disabled in the libretro port.
BIOS loading: libretro.c retro_load_game() lines 1035-1049.
Core load: memory.c LoadBios() line 1260, T123Load() memory.h lines 196-264.
BIOS loading: retro_load_game() at yabause/src/libretro/libretro.c:1035-1049.
Core load: LoadBios() at yabause/src/memory.c:1260-1263, T123Load() at yabause/src/memory.h:196-265.
files:
- name: "saturn_bios.bin"
+28
View File
@@ -2975,3 +2975,31 @@ class AMameCloneNameIsANameStep(unittest.TestCase):
self.assertEqual(
self.resolve(size=5, validation=["size"]), (None, "not_found")
)
class ProseCitationsUseTheTrackedForm(unittest.TestCase):
"""profile_sync tracks `path:line` citations only. `libretro.c
I_FindFile, line 1742` escaped it, and sixteen such citations in six
profiles stayed behind when their pins moved, four already pointing at
other code."""
UNTRACKED = re.compile(
r"[\w./+-]+\.(?:c|cc|cpp|cxx|h|hh|hpp|inc|cs|py|rs|go|java|kt|js|ts"
r"|m|mm|s|asm|lua|sh)\b[^\n:]{0,80}?\blines? \d+"
)
def test_the_pattern_reads_the_old_forms(self):
for text in ("libretro.c I_FindFile, line 1742",
"memory.c LoadBios() line 1353",
"libretro_core_options.h lines 52-64"):
self.assertRegex(text, self.UNTRACKED)
self.assertNotRegex("I_FindFile, libretro/libretro.c:4176-4252", self.UNTRACKED)
def test_no_profile_writes_a_line_number_profile_sync_cannot_see(self):
found = [
f"{path.name}:{number}: {match.group(0)}"
for path in sorted((ROOT / "emulators").glob("*.yml"))
for number, line in enumerate(path.read_text().splitlines(), 1)
for match in self.UNTRACKED.finditer(line)
]
self.assertEqual(found, [])