Consider providing a standard way for formatters to report errors
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
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
- 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 google/vim-codefmt
-
Write a codefmt FAQ Apertaenhancement
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
google/vim-codefmt#53 ·
-
Add meson format Apertanew formatter
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
google/vim-codefmt#243 ·
-
LCF for lua formatting Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
google/vim-codefmt#240 · 1 commento ·
-
Add `:CodefmtInfo` command to report diagnostics to help users check config / diagnose problems Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
google/vim-codefmt#234 · 2 commenti ·
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 45/100
google/vim-codefmt#222 · 3 commenti ·
Tutte le issue di google/vim-codefmt
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
pastelsky/bundlephobia#1122 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/skills#1811 · 1 commento ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
CachyOS/distribution#587 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
datalayer/mcp-compose#42 ·
-
[Chore] Keep one viget-block-generator skill and replicate it, instead of four tracked copies Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100