File: find-v0.8-type-transitions.sh

package info (click to toggle)
python-aioxmpp 0.13.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 6,244 kB
  • sloc: python: 97,761; xml: 215; makefile: 155; sh: 63
file content (9 lines) | stat: -rwxr-xr-x 503 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
#!/bin/bash
ARGS="--python"
# this still misses Presence(from_=some_function(), show=…), as regexes cannot count
ag $ARGS '\b(Presence(State)?)\((\s*|[^()]*?,\s*)(show=)?("|None)' "$@"
# if you have unittests working with shows:
ag $ARGS '\bassertEqual\(\s*(None|"(xa|away|dnd|chat)")\s*,\s*[^()]*?show[^()]*?' "$@"
ag $ARGS '\bassertEqual\([^()]*?show[^()]*?,\s*(None|"(xa|away|dnd|chat)")' "$@"
ag $ARGS '\.show\s*=\s*(None|"(xa|away|dnd|chat))' "$@"
ag $ARGS '==\s*(None|"(xa|away|dnd|chat))' "$@"