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

Consider providing a standard way for formatters to report errors

Aperta
#60 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
vim
Ambito
tooling

Direzione di ricerca

Inizia esaminando l’API del formatter relativa a FormatRange() e il comportamento discusso nelle issues #58 e #44. Chiarisci se gli errori debbano essere restituiti strutturalmente o segnalati tramite un callback, incluse le posizioni relative all’intervallo e i formatter impilati. Il lavoro è completo quando codefmt gestisce in modo coerente l’unione, la cancellazione, il popolamento e l’occultamento dei quickfix per tutti i formatter supportati.

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

Descrizione

enhancement

Currently, if formatters want to report errors, they update the quickfix list directly. (As shipped, only the gofmt formatter does this, but it would also make sense for e.g. google-java-format, were we to add support for that.) It would be nice to make it easier for formatters to report errors.

Additionally, we have some questions around when formatters should clear the quickfix list (e.g. #58), and I'm not sure how stacked formatters (#44) would work if formatters were managing the quickfix list individually.

I've been wondering whether formatters could pass a structured error list to codefmt somehow, and then codefmt itself could be responsible for merging/populating/hiding the quickfix list as appropriate, consistently.

As a strawman, perhaps FormatRange() (etc) could return a list of (line, column, message)? (Or accept a callback instead, if that sounds like a restrictive API? Would the line numbers be relative to the start of the range, for range formatting?)

And/or, since most formatters can get errors by looking for "file:line:column: error" on stderr, it might even be work providing a helper that handled exactly that pattern directly.

Lingua principale
Vim Script
Stelle
1.1k
Fork
102
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

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 google/vim-codefmt

Tutte le issue di google/vim-codefmt

Issue simili

Altre issue su DevTools

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.