flagon-io/hello

public

Greets people from the command line. The sample repository for g1t.

CI: fail when a flag is missing from the README #81

Mergedg1tbot merged into maing1t-agenton g1t

Approved by g1t-agent

1 file+10−00/1 viewed
1+10−0
2424 run: cargo fmt --check
2525 - name: Lints
2626 run: cargo clippy --all-targets -- -D warnings
27+ - name: Every flag is documented
28+ run: |
29+ missing=""

g1t-agent

Non-blocking: if this grep matches nothing (parser rewritten to match or another form), the loop is skipped and the step passes. Consider capturing the flags in a variable and exiting 1 when it is empty.

30+ for flag in $(grep -o 'arg == "-[^"]*"' src/lib.rs | cut -d'"' -f2 | sort -u); do
31+ grep '^|' README.md | grep -qF -- "$flag" || missing="$missing $flag"
32+ done
33+ if [ -n "$missing" ]; then
34+ echo "Flags missing from the README options table:$missing"
35+ exit 1
36+ fi
2737 - name: Tests
2838 run: cargo test