Local runner for GitHub autograder
at main 40 lines 1.1 kB view raw
1use clap::Parser; 2 3#[derive(Parser)] 4#[command(name="gh-grader-preview", author, version, about, long_about = None)] 5pub struct Cli { 6 #[arg( 7 short = 'f', 8 long = "file", 9 help = "Override the autograder.json file to use, by default we look in `.github/classroom/autograder.json`" 10 )] 11 pub file: Option<String>, 12 #[arg( 13 short = 'v', 14 long = "verbose", 15 help = "Show stdout and stderr of tests" 16 )] 17 pub verbose: bool, 18 #[arg( 19 short = 't', 20 long = "test", 21 help = "Run only the test specified (must match `name` case-insensitively)" 22 )] 23 pub test: Option<String>, 24 #[arg( 25 short = 'x', 26 long = "skip", 27 help = "Skip the first X tests, useful if you have tests that are purely informational" 28 )] 29 pub skip: Option<usize>, 30 #[arg( 31 long = "man-page", 32 help = "Print the manpage for this command to stdout" 33 )] 34 pub man_gen: bool, 35 #[arg( 36 long = "completions", 37 help = "Prints out the completions for the shell specified" 38 )] 39 pub completions: Option<String>, 40}