Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Tools/src/checkstyle.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env bash
#!/bin/sh
echo "Run checkstyle script"

# run gofmt
echo "Run 'gofmt'"
unformatted=$(gofmt -l `pwd`/src/)
if [[ -n $unformatted ]]; then
unformatted=$(gofmt -l $(pwd)/src/)
if [ -n "$unformatted" ]; then
echo >&2 "Error: Found files not formatted by gofmt"
for fi in $unformatted; do
echo >&2 $fi
Expand All @@ -15,11 +15,11 @@ fi

# run goimports
echo "Try update 'goimports'"
GOPATH=`pwd`/Tools go get golang.org/x/tools/cmd/goimports
GOPATH=$(pwd)/Tools go get golang.org/x/tools/cmd/goimports

echo "Run 'goimports'"
unformatted=$(Tools/bin/goimports -l `pwd`/src/)
if [[ -n $unformatted ]]; then
unformatted=$(Tools/bin/goimports -l $(pwd)/src/)
if [ -n "$unformatted" ]; then
echo >&2 "Error: Found files not formatted by goimports"
for f in $unformatted; do
echo >&2 $f
Expand All @@ -29,5 +29,5 @@ if [[ -n $unformatted ]]; then
fi

echo "Run 'go vet'"
ln -s `pwd` `pwd`/vendor/src/github.com/aws/SSMCLI
ln -s $(pwd) $(pwd)/vendor/src/github.com/aws/SSMCLI
go vet ./src/...