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

CLI: Centralize target specs and lint free-text examples in fullDescription

Chiusa
#1,649 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

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

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

  1. Centralize target specs. Describe the accepted target forms once, from the positional definition (LIST_TARGET_POSITIONAL, LIST_ORG_TARGET_POSITIONAL and friends) or a shared helper. Then render them the same way in --help, the generated docs and the skill references. Drop the per-command Target patterns: blocks.
  2. Move the remaining examples into docs.examples. Pagination, filtering and output examples belong in command metadata, like #1633 did for the fragments.
  3. Extend the lint rule. Make no-examples-in-full-description also flag example-like lines in fullDescription: indented lines starting with sentry (optionally with a trailing # comment), whatever label sits above them. That keeps new free-text examples from coming back.

Done when

  • No command fullDescription contains indented sentry … 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.

--

View Junior Session [Sentry]

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

  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 getsentry/toolkit

Tutte le issue di getsentry/toolkit

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.