mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 06:44:16 +00:00
chore: adds some just recipies for showing errors and tracking todos
This commit is contained in:
parent
4f3231a51c
commit
8173d717b1
4 changed files with 80 additions and 4 deletions
19
TODO.md
Normal file
19
TODO.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
- [ ] update-todo.sh
|
||||
- [ ] src/lib.rs
|
||||
-[ ] 578:@TODO @release @docs
|
||||
-[ ] 580:@TODO @release @docs
|
||||
-[ ] 583:@TODO @release @docs
|
||||
-[ ] 592:@TODO @release @docs
|
||||
-[ ] 598:@TODO @release @docs
|
||||
-[ ] 608:@TODO @release @docs
|
||||
-[ ] 610:@TODO @release @docs
|
||||
-[ ] 614:@TODO @release @docs
|
||||
-[ ] 616:@TODO @release @docs
|
||||
-[ ] 619:@TODO @release @docs
|
||||
-[ ] 623:@TODO @release @docs
|
||||
- [ ] src/app/parser.rs
|
||||
-[ ] 678:@TODO @perf: cloning all these Apps ins't great, but since it's just displaying the help
|
||||
- [ ] src/app/mod.rs
|
||||
-[ ] 1760:@TODO @v3-alpha @perf: should only propagate globals to subcmd we find, or for help
|
||||
- [ ] src/args/arg.rs
|
||||
-[ ] 3545:@TODO @p2 @docs @release: write docs
|
17
etc/count-tests.sh
Executable file
17
etc/count-tests.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
IFS=$'\n'
|
||||
|
||||
touch .tmp.out
|
||||
|
||||
echo -n "Testing"
|
||||
for TEST in $(find tests/ -type f -name "*.rs" -exec basename {} .rs \;); do
|
||||
echo -n "."
|
||||
echo -n -e "$TEST:\t" >> .tmp.out
|
||||
cargo test --test $TEST 2>&1 | grep -o -e '[0-9]* failed;' >> .tmp.out
|
||||
done
|
||||
|
||||
echo "Done"
|
||||
column -t < .tmp.out
|
||||
rm .tmp.out
|
||||
unset IFS
|
18
etc/update-todo.sh
Executable file
18
etc/update-todo.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
rg -h 1>/dev/null || (echo "ripgrep not found" && false)
|
||||
|
||||
IFS=$'\n'
|
||||
|
||||
mv TODO.md TODO.bak || true
|
||||
touch TODO.md
|
||||
|
||||
for FILE in $(rg '@TODO' --ignore-file='update-todo.sh' --files-with-matches); do
|
||||
echo "- [ ] $FILE" >> TODO.md
|
||||
for LINE in $(rg -noe '@TODO([ @a-zA-Z-]+):?(.*)$' $FILE); do
|
||||
echo " -[ ] $LINE" >> TODO.md
|
||||
done;
|
||||
done;
|
||||
unset IFS
|
||||
|
||||
rm TODO.bak || true
|
30
justfile
30
justfile
|
@ -1,3 +1,4 @@
|
|||
|
||||
@update-contributors:
|
||||
echo 'Removing old CONTRIBUTORS.md'
|
||||
mv CONTRIBUTORS.md CONTRIBUTORS.md.bak
|
||||
|
@ -11,11 +12,11 @@
|
|||
echo "This list was generated by [mgechev/github-contributors-list](https://github.com/mgechev/github-contributors-list)" >> CONTRIBUTORS.md
|
||||
rm CONTRIBUTORS.md.bak
|
||||
|
||||
run-test TEST:
|
||||
cargo test --test {{TEST}}
|
||||
run-test TESTG TEST="":
|
||||
cargo test --test {{TESTG}} -- {{TEST}}
|
||||
|
||||
debug TEST:
|
||||
cargo test --test {{TEST}} --features debug
|
||||
debug TESTG TEST="":
|
||||
cargo test --test {{TESTG}} --features debug -- {{TEST}}
|
||||
|
||||
run-tests:
|
||||
cargo test --features "yaml unstable"
|
||||
|
@ -37,3 +38,24 @@ clean:
|
|||
find . -type f -name "*.orig" -exec rm {} \;
|
||||
find . -type f -name "*.bk" -exec rm {} \;
|
||||
find . -type f -name ".*~" -exec rm {} \;
|
||||
|
||||
top-errors NUM="95":
|
||||
@cargo check 2>&1 | head -n {{NUM}}
|
||||
|
||||
count-errors:
|
||||
@cargo check 2>&1 | grep -e '^error' | wc -l
|
||||
|
||||
find-errors:
|
||||
@cargo check 2>&1 | grep --only-matching -e '-->[^:]*' | sort | uniq -c | sort -nr
|
||||
|
||||
count-warnings:
|
||||
@cargo check 2>&1 | grep -e '^warning' | wc -l
|
||||
|
||||
find-warnings:
|
||||
@cargo check 2>&1 | grep -A1 -e 'warning' | grep --only-matching -e '-->[^:]*' | sort | uniq -c | sort -nr
|
||||
|
||||
@update-todo:
|
||||
./etc/update-todo.sh
|
||||
|
||||
@count-failures:
|
||||
./etc/count-tests.sh
|
||||
|
|
Loading…
Reference in a new issue