[FEATURE] file validators should handle stdin and stdout properly
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
Start by locating input_file_validator and its related validation tests or documentation, then reproduce the failures with "-" and "/dev/stdin" on the current main. Done means the supported stdin/stdout values are accepted without extension checks, with the intended handling of FIFOs clarified before implementation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Does this problem persist on the current main?
- I have verified the issue on the current main
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Passing "-" to an input_file_validator fails with
what(): Validation failed for positional option 1: The file "-" does not exist!`
Passing "/dev/stdin" also fails:
what(): Validation failed for positional option 1: Expected a regular file "/dev/stdin"!
Expected Behavior
Both of these values should work.
Both of them should also be exempt from extension-checks (or there should be another validator called input_file_or_stdin_validator or maybe even just input_validator because it covers all possible inputs?).
P.S.: independent of "/dev/stdout", I think it is too restrictive to only allow regular files. Being able to open FIFOs is useful, too.
Steps To Reproduce
try it :)
Environment
- Operating system: Ubuntu 22.04
- Sharg version: 89bb8e71172ceea20b95beed5e071fe62b13d91c
- Compiler: gcc-11.3
Anything else?
I like the config being switched to designated initialisers 👍🏻
Suggestion: the documentation would be easier to read if validators and exceptions were in their own folder, because there would be fewer items cluttering the top-level of the documentation. They could even have their own namespace (sharg::validator::input_file ...).
- Lingua principale
- C++
- Stelle
- 11
- Fork
- 9
- Merge medio
- 8h 34m
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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 seqan/sharg-parser
-
Follow-up: Auto-Synopsis on macOSForse di nuovo libera @eseiler l’ha presa 266 giorni fa e non c’è nessuna pull request aperta. Apertabug
seqan/sharg-parser#303 · 1 assegnatario ·
-
[suggestion] Check that `.parse()` is called.Forse già presa @eseiler l’ha presa 1300 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
seqan/sharg-parser#168 · 7 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
seqan/sharg-parser#165 · 1 commento ·
-
Too strict validatorsAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
seqan/sharg-parser#161 · 3 commenti ·
-
help text: std types should be renamedForse di nuovo libera @eseiler l’ha presa 275 giorni fa e non c’è nessuna pull request aperta. Aperta
seqan/sharg-parser#153 · 3 commenti · 1 assegnatario ·
Tutte le issue di seqan/sharg-parser
Issue simili
-
agent:WSL bug code-review linux LOW
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
[raylib] update to 6.2Apertacategory:port-update
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 2 giorni
-
[BUG] SOLE B94 (current model): Set Target Resistance Level rejected with 80 04 03 – bike expects 0.1 unitsForse già presa @cagnulein l’ha presa oggi. Aperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 78/100
cagnulein/qdomyos-zwift#5380 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
improvement ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ihhub/fheroes2#11062 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno