github.com/hyperledger/fabric-ca@v2.0.0-alpha.0.20201120210307-7b4f34729db1+incompatible/scripts/check_lint (about)

     1  #!/bin/bash
     2  #
     3  # Copyright IBM Corp. All Rights Reserved.
     4  #
     5  # SPDX-License-Identifier: Apache-2.0
     6  #
     7  
     8  function runlint {
     9     for dir in `ls`
    10     do
    11        if [ -d $dir ]; then
    12          case "$dir" in
    13           vendor|bin|testdata|scripts)
    14             ;;
    15          *)
    16             golint $dir/...
    17             ;;
    18          esac
    19        fi
    20     done
    21  }
    22  
    23  echo "Running lint ..."
    24  found=$(runlint)
    25  if [ "$found" != "" ]; then
    26     echo "YOU MUST FIX THE FOLLOWING LINT PROBLEMS:"
    27     echo "$found"
    28     echo "END LINT PROBLEMS"
    29     exit 1
    30  fi
    31  echo "No lint errors were found"