github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/scripts/verify.bash (about)

     1  #!/bin/bash
     2  # Copyright 2014 Canonical Ltd.
     3  # Licensed under the AGPLv3, see LICENCE file for details.
     4  
     5  # This is called from pre-push.bash to do some verification checks on
     6  # the Go code.  The script will exit non-zero if any of these tests
     7  # fail. However if environment variable IGNORE_VET_WARNINGS is a non-zero
     8  # length string, go vet warnings will not exit non-zero.
     9  
    10  set -e
    11  
    12  VERSION=`go version | awk '{print $3}'`
    13  echo "go version $VERSION"
    14  
    15  STATIC_ANALYSIS="${STATIC_ANALYSIS:-}"
    16  if [ -n "$STATIC_ANALYSIS" ]; then
    17      make static-analysis
    18  else
    19      echo "Ignoring static analysis, run again with STATIC_ANALYSIS=1 ..."
    20  fi
    21  
    22  echo "checking: tests are wired up ..."
    23  ./scripts/checktesting.bash