...

Text file src/github.com/ory/fosite/scripts/test-format.sh

Documentation: github.com/ory/fosite/scripts

     1#!/bin/bash
     2
     3set -euo pipefail
     4
     5cd "$( dirname "${BASH_SOURCE[0]}" )/.."
     6
     7toformat=$(goimports -l $(go list -f {{.Dir}} ./... | grep -v vendor | grep -v 'fosite$'))
     8[ -z "$toformat" ] && echo "All files are formatted correctly"
     9[ -n "$toformat" ] && echo "Please use \`goimports\` to format the following files:" && echo $toformat && exit 1
    10
    11exit 0

View as plain text