File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 22
33source " ${MAKEDIR} /.validate"
44
5- packages=( $( go list ./... 2> /dev/null | grep -vE " ^github.com/docker/docker/vendor|^github.com/docker/docker/autogen" || true ) )
5+ IFS=$' \n '
6+ files=( $( validate_diff --diff-filter=ACMR --name-only -- ' *.go' | grep -v ' ^vendor/' || true) )
7+ unset IFS
68
79errors=()
8- for p in " ${packages[@]} " ; do
9- # Remove the github.com/docker/docker/ prefix from listed package
10- package=" ${p# github.com/ docker/ docker/ } "
11- # Run golint on package/*.go file explicitly to validate all go files
12- # and not just the ones for the current platform.
13- failedLint=$( golint $package /* .go)
10+ for f in " ${files[@]} " ; do
11+ # we use "git show" here to validate that what's committed passes go vet
12+ failedLint=$( golint " $f " )
1413 if [ " $failedLint " ]; then
1514 errors+=( " $failedLint " )
1615 fi
You can’t perform that action at this time.
0 commit comments