Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

xtask check-architecture-doc: guard against slash-containing prose false-failing CI

Aperta
#440 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

The issue is in xtask/src/architecture_doc.rs, specifically the is_path_candidate function. Start by reading the existing code around line 574 that handles hyphenated bare words. You need to add a similar guard for slash-containing prose. Write a test in the same file with examples like read/write and GPU/CPU to ensure they are not flagged as path citations. Run cargo xtask check-architecture-doc to verify your changes work and don't break existing valid path citations.

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

Descrizione

Background

Follow-up from review on #432 (cargo xtask check-architecture-doc).

is_path_candidate (xtask/src/architecture_doc.rs) treats any backtick-quoted span containing / as a path citation unconditionally, with no guard against ordinary prose. Hyphenated bare words got an explicit guard against this exact failure mode (see the is_hyphenated_bare_word handling around architecture_doc.rs:574, protecting against e.g. `read-only` in prose), but nothing analogous exists for slash-containing prose.

So a future edit to docs/architecture.md containing backtick-quoted prose like `read/write`, `and/or`, or `GPU/CPU` would be misread as a path citation and false-fail CI, since none of those exist in the tracked tree.

Confirmed not currently live: docs/architecture.md doesn't contain this pattern today, so this isn't breaking anything yet — it's a latent trap for whoever edits the doc next.

Suggested fix

Extend is_path_candidate (or a helper it calls) with a guard analogous to is_hyphenated_bare_word, requiring path-shaped segments on both sides of / (e.g. each segment itself looking like a plausible path/file/directory component) before treating a slash-containing span as a citation, rather than accepting any slash unconditionally.

Add a regression test with common slash-joined prose phrases (read/write, and/or, GPU/CPU) confirming they're not treated as citations, alongside the existing real path/directory cases.

Reported independently by two reviewers on #432 (Copilot and juhovainio), both flagged non-blocking and suitable for a follow-up rather than expanding that PR further.

Lingua principale
Rust
Stelle
40
Fork
10
Merge medio
5g 2h
PR unite (30g)
54

Preparare l'ambiente

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.

Altre issue di ROCm/rocm-cli

Tutte le issue di ROCm/rocm-cli

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.