morpheus

A Matrix client written in Go-QT
git clone git://archive.git.mtrnord.blog/Nordgedanken/morpheus.git
Log | Files | Refs | README | LICENSE

lint.sh (842B)


      1 
      2 #! /bin/bash
      3 
      4 # Runs the linters against dendrite
      5 
      6 # The linters can take a lot of resources and are slow, so they can be
      7 # configured using two environment variables:
      8 #
      9 # - `DENDRITE_LINT_CONCURRENCY` - number of concurrent linters to run,
     10 #   gometalinter defaults this to 8
     11 # - `DENDRITE_LINT_DISABLE_GC` - if set then the the go gc will be disabled
     12 #   when running the linters, speeding them up but using much more memory.
     13 
     14 
     15 set -eu
     16 
     17 args="--config=linter.json"
     18 
     19 if [ -n "${MORPHEUS_LINT_CONCURRENCY:-}" ]
     20 then args="$args --concurrency=$MORPHEUS_LINT_CONCURRENCY"
     21 fi
     22 
     23 if [ -z "${MORPHEUS_LINT_DISABLE_GC:-}" ]
     24 then args="$args --enable-gc"
     25 fi
     26 
     27 echo "Installing lint search engine..."
     28 go install github.com/alecthomas/gometalinter/
     29 gometalinter --config=linter.json ./... --install
     30 
     31 echo "Looking for lint..."
     32 gometalinter ./... ${args}