Do not run gofmt in the src directory
All the src contains is a symbolic link to the root, causing gofmt to indefinitely recurse until it errors out. On Windows, this causes an error message like GetFileAttributesEx src\github.com\github\git-lfs\src\github.com\github\git-lfs\src\github.com\github\git-lfs\src\github.com\github\git-lfs\src\github.com\github\git-lfs\.git\objects\pack\pack-2fc21819ce9855ebf1a1f3ac77cf464c8a4e6e42.idx: The system cannot find the path specified.
This commit is contained in:
parent
a06accadc8
commit
7261b7140f
@ -6,7 +6,7 @@ hash goimports 2>/dev/null && {
|
||||
}
|
||||
|
||||
# don't run gofmt in these directories
|
||||
ignored=(/bin/ /docs/ /log/ /man/ /tmp/ /vendor/ /rpm/ /docker/ /debian/)
|
||||
ignored=(/bin/ /docs/ /log/ /man/ /tmp/ /vendor/ /rpm/ /docker/ /debian/ /src/)
|
||||
for i in */ ; do
|
||||
if [[ ! ${ignored[*]} =~ "/$i" ]]; then
|
||||
$formatter -w -l "$@" "${i%?}"
|
||||
|
Loading…
Reference in New Issue
Block a user