github.com/decred/dcrlnd@v0.7.6/scripts/check-rest-annotations.sh (about)

     1  #!/bin/bash
     2  
     3  for proto in $(find . -name "*.proto"); do
     4    for rpc in $(awk '/    rpc /{print $2}' "$proto"); do
     5      yaml=${proto%%.proto}.yaml
     6      if ! grep -q "$rpc" "$yaml"; then
     7        echo "RPC $rpc not added to $yaml file"
     8        exit 1
     9      fi
    10    done
    11  done