mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-09 08:22:19 +02:00
fix(docs): cite files, not line numbers, in the generated env reference (#6538)
website/configuration-reference.md pinned every ODYSSEUS_* read to a `path:line`, and test_env_reference fails when the committed page differs from the generator output. So any change that adds or removes a line above an env read in any scanned file has to regenerate the page, even when no variable changed. Since the page landed on 2026-09-30, 24 of the 34 commits touching it changed nothing but line numbers, and all three open PRs that touch it today do the same - which also makes them conflict with each other on that file. The Read in column now names the file, and "+N more" counts other files rather than other read sites. The page still goes stale, and the test still fails, when a variable is added, removed, moves to another file, or changes default. check_notes still reports path:line on stderr, where it is useful and never committed.
This commit is contained in:
@@ -1023,9 +1023,15 @@ def _cell(text: str) -> str:
|
||||
|
||||
|
||||
def _read_cell(variable: Variable) -> str:
|
||||
primary = f"`{variable.primary.location}`"
|
||||
extra = len(variable.reads) - 1
|
||||
return primary if extra <= 0 else f"{primary} (+{extra} more)"
|
||||
"""The file a variable is read in, and how many other files read it.
|
||||
|
||||
Files only, never line numbers. A line number here goes stale whenever an
|
||||
unrelated edit shifts the file, which made every such PR regenerate this page
|
||||
and conflict with every other PR doing the same.
|
||||
"""
|
||||
primary = variable.primary.path
|
||||
extra = len({read.path for read in variable.reads} - {primary})
|
||||
return f"`{primary}`" if extra <= 0 else f"`{primary}` (+{extra} more)"
|
||||
|
||||
|
||||
def _default_cell(variable: Variable) -> str:
|
||||
|
||||
Reference in New Issue
Block a user