github.com/imran-kn/cilium-fork@v1.6.9/contrib/scripts/check-log-newlines.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -e
     4  
     5  if grep --include \*.go -r 'log\.' . | grep -v vendor \
     6    | grep -v envoy \
     7    | grep -v contrib \
     8    | grep -v logging.go \
     9    | grep -F "\n"; then
    10    echo "found newline(s) in log call(s), please remove ending \n"
    11    exit 1
    12  fi