mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 03:55:19 +00:00
774e2efce8
* chore(lint): Update local make lint to match CI This updates the `make lint` behavior to match the command being run in CI. In addition, we refactor the make lint command to use docker in order to to ease cross platform install, use a local build cache that integrates with make clean, use the same version file, and encapsulate the logic in its own make include. We also remove the old lint logic as to not introduce a duplicate target and avoid confusion from a difference in behavior. While solutions like act for running github actions locally work, it is not as straightfoward, is slower, and uses the local git repository instead of a clone (though I am not sure how the checkout step works within act). * fix(lint): Use shared timeout with .golangci.yml Instead of using a local and different timeout in the lint makefile target we can rely on golangci to load this configuration from .golangci.yml instead and share this setting with CI. * fix(lint): Fix golangci-lint cache mount path This uses the correct cache dir default of ~/.cache enabling use of cache between lint calls. * fix(lint): Fix lint caching This includes a couple fixes - 1) It adds support for full caching of go mod and go build, speeding up the lint process quite a bit. And 2) does not mix lint cache with make clean files -- the docker container creates root owned files that cause make clean to error and we choose not to require make clean to run with higher permissions. The cache must be deleted manually.
47 lines
564 B
Plaintext
47 lines
564 B
Plaintext
# Binaries for programs and plugins
|
|
*.exe
|
|
*.exe~
|
|
*.dll
|
|
*.so
|
|
*.dylib
|
|
|
|
# Test binary, build with `go test -c`
|
|
*.test
|
|
|
|
# Output of the go coverage tool
|
|
*.out
|
|
cover.html
|
|
|
|
# Exclude build files
|
|
vendor
|
|
|
|
# IDE files
|
|
*.vscode
|
|
*.idea
|
|
node_modules
|
|
docs/node_modules
|
|
docs/.vuepress/dist
|
|
|
|
# Ignore macOS file system metadata
|
|
.DS_Store
|
|
|
|
# Ignore build outputs
|
|
out
|
|
|
|
# Ignore build cache dir
|
|
build/.cache
|
|
|
|
# Ignore make lint cache
|
|
build/.golangci-lint
|
|
|
|
# Ignore installed binaires
|
|
build/bin
|
|
|
|
# Ignore build dirs
|
|
build/darwin
|
|
build/linux
|
|
|
|
# Go workspace files
|
|
go.work
|
|
go.work.sum
|