CLI: Centralize target specs and lint free-text examples in fullDescription
I maintainer di solito rispondono entro 1 giorno
Una pull request collegata è già stata integrata.
- #1652 di @sentry-junior — integrata
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- eslint, node.js, typescript
- Ambito
- cli, documentation, tooling
Direzione di ricerca
Start with packages/cli/src/lib/list-command.ts for target helpers, packages/cli/lint-rules/cli-oxlint-plugin.js for the lint rule, and the command files named in the issue for existing fullDescription text. Review #1575 and #1633 for context, then inspect the generated --help, docs, and skill references. Done means target syntax has one shared source, examples move to docs.examples, and the lint rule catches indented sentry examples; linked pull request #1652 is already open.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow-up from review on #1575.
Problem
Many command fullDescription strings still carry free-text usage blocks such as Target patterns:, Pagination: and Filtering and output:. Each line is a hand-aligned sentry … # comment example. On main, 21 files under packages/cli/src/commands/ have one of those section labels, and about 170 such lines are spread across ~40 command files (for example project/list.ts, team/list.ts, repo/list.ts, monitor/list.ts, integration/list.ts, issue/list.ts, log/list.ts, span/list.ts, release/list.ts).
The target syntax (<org>/, <org>/<project>, <project>, auto-detect) is restated by hand per command. Only some commands use the shared targetPatternExplanation() helper in src/lib/list-command.ts, so the wording drifts between commands.
The no-examples-in-full-description rule in packages/cli/lint-rules/cli-oxlint-plugin.js only catches an Examples heading or Examples: label (EXAMPLES_LABEL_RE). These blocks get past it because they use other labels.
Proposal
- Centralize target specs. Describe the accepted target forms once, from the positional definition (
LIST_TARGET_POSITIONAL,LIST_ORG_TARGET_POSITIONALand friends) or a shared helper. Then render them the same way in--help, the generated docs and the skill references. Drop the per-commandTarget patterns:blocks. - Move the remaining examples into
docs.examples. Pagination, filtering and output examples belong in command metadata, like #1633 did for the fragments. - Extend the lint rule. Make
no-examples-in-full-descriptionalso flag example-like lines infullDescription: indented lines starting withsentry(optionally with a trailing# comment), whatever label sits above them. That keeps new free-text examples from coming back.
Done when
- No command
fullDescriptioncontains indentedsentry …example lines. - Target syntax text comes from one shared source.
- The lint rule fails on a reintroduced free-text example block.
via Junior system actor event.
--
- Lingua principale
- TypeScript
- Stelle
- 938
- Fork
- 166
- Merge medio
- 1g 5h
- PR unite (30g)
- 172
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/toolkit
-
bug MCP
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
getsentry/toolkit#1621 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug MCP
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
getsentry/toolkit#1618 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
getsentry/toolkit#1471 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
getsentry/toolkit#1632 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
getsentry/toolkit#1630 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di getsentry/toolkit
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
awslabs/visual-asset-management-system#804 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
restatedev/sdk-typescript#813 ·
-
bug desktop P1 session XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Merit-Systems/x402scan#1312 ·
-
type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Azure/apiops-cli#331 ·
I maintainer di solito rispondono entro 3 giorni