Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#440 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
40
Forks
10
Merge medio
5 d 11 h
PR fusionados (30 d)
52

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ROCm/rocm-cli

Todos los issues de ROCm/rocm-cli

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.