Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions hack/go-fmt.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/sh
# Example: ./hack/go-lint.sh installer/... tests/smoke

if [ "$IS_CONTAINER" != "" ]; then
for TARGET in "${@}"; do
find "${TARGET}" -name '*.go' ! -path '*/vendor/*' ! -path '*/.build/*' -exec gofmt -s -w {} \+
Expand Down
2 changes: 1 addition & 1 deletion hack/go-lint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# Example: ./hack/go-lint.sh installer/... tests/smoke
# Example: ./hack/go-lint.sh installer/... pkg/... tests/smoke

if [ "$IS_CONTAINER" != "" ]; then
golint -set_exit_status "${@}"
Expand Down
16 changes: 2 additions & 14 deletions hack/go-vet.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
#!/bin/sh
if [ "$IS_CONTAINER" != "" ]; then
cd ..
SOURCE_DIR="$(pwd)"
cd .. || exit
ROOT_DIR="$(pwd)"
TARGET_DIR="${ROOT_DIR}/openshift"
if [ "$SOURCE_DIR" != "$TARGET_DIR" ]; then
mv "$SOURCE_DIR" "$TARGET_DIR"
fi;
cd "${TARGET_DIR}/installer/" || exit
go vet "$1"
go vet "${@}"
else
for dir in "$@"
do
docker run --rm --env IS_CONTAINER='TRUE' -v "$PWD":/go/src/github.com/openshift/installer -w /go/src/github.com/openshift/installer quay.io/coreos/golang-testing ./hack/go-vet.sh "$dir"
done;
docker run --rm --env IS_CONTAINER='TRUE' -v "$PWD":/go/src/github.com/openshift/installer -w /go/src/github.com/openshift/installer quay.io/coreos/golang-testing ./hack/go-vet.sh "${@}"
fi;