Skip to content

Commit

Permalink
scripts: scripts now format sdk files as well
Browse files Browse the repository at this point in the history
  • Loading branch information
arekkas authored and arekkas committed Oct 5, 2017
1 parent 7943f59 commit cf5ab6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions scripts/run-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ set -euo pipefail

cd "$( dirname "${BASH_SOURCE[0]}" )/.."

goimports -w $(go list -f {{.Dir}} ./... | grep -v vendor | grep -v hydra$)
goimports -w *.go
goimports -w $(go list -f {{.Dir}} ./... | grep -v vendor | grep -v "ory.hydra$")
goimports -w *.go

git add -A
2 changes: 1 addition & 1 deletion scripts/test-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail

cd "$( dirname "${BASH_SOURCE[0]}" )/.."

toformat=$(goimports -l $(go list -f {{.Dir}} ./... | grep -v vendor | grep -v 'hydra$'))
toformat=$(goimports -l $(go list -f {{.Dir}} ./... | grep -v vendor | grep -v 'ory.hydra$'))
[ -z "$toformat" ] && echo "All files are formatted correctly"
[ -n "$toformat" ] && echo "Please use \`goimports\` to format the following files:" && echo $toformat && exit 1

Expand Down

0 comments on commit cf5ab6b

Please sign in to comment.