ref-check scans git-ignored directories, so a vendored checkout floods it with errors

Aperta Adatta ai principianti
#2 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
75/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
git, python
Ambito
cli, tooling

Direzione di ricerca

Parti dall'attraversamento delle directory in ref-check e dal filtro fisso SKIP_DIRS che applica. Quando la root è dentro un work tree git, sostituisci quell'attraversamento con l'output di git ls-files --cached --others --exclude-standard, mantenendo l'attraversamento esistente come fallback fuori da git. Fatto significa che eseguire ./ref-check --root <project> con un checkout .local/ ignorato non segnala errori da quei file mentre continua a scansionare i documenti tracciati del progetto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

ref-check walks every directory under the root except a fixed SKIP_DIRS set, so files git ignores are scanned for @refs.

What I did: ran ./ref-check --root <project> on a package whose git-ignored .local/ holds a checkout of another LLP-using repository for a spike. That checkout keeps its corpus in a private repo cloned into llp/ and ignored, so in a fresh clone it has no llp/ directory and is not detected as a nested corpus root.

Expected: the check covers what the repository tracks, so the ignored checkout is skipped.

Actual: ref-check: FAIL — 6 LLP docs, 2981 refs in 32001 files, 2963 errors, every error from the ignored checkout (broken ref: LLP 0057 not found under llp/). The project's own 6 documents are clean when checked on a copy without .local/.

A possible fix: when the root is inside a git work tree, take the file list from git ls-files --cached --others --exclude-standard (tracked plus untracked-but-not-ignored) and fall back to the current walk otherwise. That keeps the checker zero-dependency, since git is already required by the skills. An --exclude <dir> flag would be a smaller alternative.

Checked at 651badc (main, 2026-11-19).


Found by a coding agent while adopting LLP in a project.

Lingua principale
Python
Stelle
92
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.