mirror of https://github.com/ethereum/go-ethereum
build: enable goimports and varcheck linters (#16446)
parent
7605e63cb9
commit
ba1030b6b8
@ -0,0 +1,18 @@ |
|||||||
|
#!/usr/bin/env bash |
||||||
|
|
||||||
|
find_files() { |
||||||
|
find . -not \( \ |
||||||
|
\( \ |
||||||
|
-wholename '.github' \ |
||||||
|
-o -wholename './build/_workspace' \ |
||||||
|
-o -wholename './build/bin' \ |
||||||
|
-o -wholename './crypto/bn256' \ |
||||||
|
-o -wholename '*/vendor/*' \ |
||||||
|
\) -prune \ |
||||||
|
\) -name '*.go' |
||||||
|
} |
||||||
|
|
||||||
|
GOFMT="gofmt -s -w"; |
||||||
|
GOIMPORTS="goimports -w"; |
||||||
|
find_files | xargs $GOFMT; |
||||||
|
find_files | xargs $GOIMPORTS; |
Loading…
Reference in new issue