github.com/thediveo/gons@v0.9.9/scripts/goreportcard.sh (about)

     1  #!/bin/bash
     2  set -e
     3  
     4  if ! command -v goreportcard-cli &>/dev/null; then
     5      export PATH="$(go env GOPATH)/bin:$PATH"
     6      if ! command -v goreportcard-cli &>/dev/null; then
     7          rm -rf /tmp/goreportcard || true
     8          git clone https://github.com/gojp/goreportcard.git /tmp/goreportcard
     9          (cd /tmp/goreportcard && make install && go install ./cmd/goreportcard-cli)
    10          rm -rf /tmp/goreportcard || true
    11          # Install a somewhat recent ineffassign over the totally outdated one
    12          # that goreportcard still insists of infecting the system with.
    13          go install github.com/gordonklaus/ineffassign@latest
    14          # Install the missing misspell, oh well...
    15          go install github.com/client9/misspell/cmd/misspell@latest
    16      fi
    17  fi
    18  
    19  goreportcard-cli -v ./...