github.com/trustbloc/kms-go@v1.1.2/scripts/check_lint.sh (about)

     1  #!/bin/bash
     2  #
     3  # Copyright SecureKey Technologies Inc. All Rights Reserved.
     4  #
     5  # SPDX-License-Identifier: Apache-2.0
     6  #
     7  
     8  set -e
     9  
    10  echo "Running $0"
    11  
    12  DOCKER_CMD=${DOCKER_CMD:-docker}
    13  GOLANGCI_LINT_IMAGE="golangci/golangci-lint:v1.53.3"
    14  SHARED_OPTS="--rm --security-opt seccomp=unconfined -e GOPROXY=${GOPROXY} -v $(pwd):/opt/workspace"
    15  
    16  if [ ! $(command -v ${DOCKER_CMD}) ]; then
    17      exit 0
    18  fi
    19  
    20  echo "linting root directory.."
    21  ${DOCKER_CMD} run ${SHARED_OPTS} -w /opt/workspace ${GOLANGCI_LINT_IMAGE} golangci-lint run
    22  echo "done linting root directory"
    23  
    24  echo "Done Running $0"