Replace `go list -m` with `go mod edit -json`, as the latter can return
the same information. This will be helpful when the project migrates to
using a Go workspace, as it will return the current module defined in
go.mod rather than all the modules from the current directory (using a
workspace, the top-level go.mod will return all the child modules from
the repository).
Signed-off-by: Ivan Valdes <ivan@vald.es>
commit 1897d8af05b3627ac4374f1d2fb285fb7af5199e
Author: Gang Li <gangligit@gmail.com>
Date: Mon Feb 3 16:35:20 2025 -0800
use uname -s to get os name
Signed-off-by: Gang Li <gangligit@gmail.com>
commit 889dd974d5873b8c5e7ccd55732279146db1bcc3
Author: Gang Li <gangligit@gmail.com>
Date: Mon Feb 3 11:34:13 2025 -0800
download correct binary for mac os
Signed-off-by: Gang Li <gangligit@gmail.com>
Signed-off-by: Gang Li <gangligit@gmail.com>
This check is duplicated as the project uses revive's receiver-naming,
which is more robust, as the current check may have false positives.
Signed-off-by: Ivan Valdes <ivan@vald.es>
Originally this was intended to be a clean up. But after further
investigation the original code didn't work. It didn't detect tabs in
shell scripts.
Signed-off-by: Ivan Valdes <ivan@vald.es>
The original go mod tidy pass implementation was done before the `--diff`
go mod option existed. This simplifies the implementation, as temporary
files are no longer needed.
Signed-off-by: Ivan Valdes <ivan@vald.es>
The markdown linter, marker, now publishes a released version with the
tool. Given that this project is written in Rust, running this check can
now be done by using the statically compiled binary without having the
Rust local environment.
Signed-off-by: Ivan Valdes <ivan@vald.es>
As tools/mod is not part of the test library's modules, the check to verify
consistent dependency versions ignored it. Explicitly get the dependencies from
this module when running verify-dep.
Signed-off-by: Ivan Valdes <ivan@vald.es>
Makefile's target `verify-dep` current behavior is to use `go list` to
check consistent dependency versions from direct dependencies. Ignoring
indirect dependencies in a multi-module project could lead to version
mismatches. If module A imports module B, module B's dependency will be
an indirect dependency in module A. Which can potentially have a version
mismatch. Therefore, use `go mod edit` with indirect dependencies, too.
So it can work with all dependencies defined in go.mod.
Fix displaying dependencies with mismatches, as the old code was
searching with grep just for the prefix, which would show other
dependencies that shared the same prefix.
Signed-off-by: Ivan Valdes <ivan@vald.es>
Copy the tools/.golangci.yaml and run the linters for which we have
already fixed. The temp .golangci.yaml will be removed when we fixes all
the linters' issues.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Changed TraceKey/StartTimeKey/TokenFieldNameGRPCKey to struct{} to
follow the correct usage of context. Similar patch to #8901.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
github.com/gyuho/gocovmerge has already been removed or turned into
a private repo. I believe it's also forked from github.com/wadey/gocovmerge.
So replace it with the original repo github.com/alexfalkowski/gocovmerge.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
Use data race detection by default for all amd64 and arm64 tests.
Remove redundant parameters in github workflows.
Signed-off-by: James Blair <mail@jamesblair.net>
No need to generate proto file;
No need to test coverage for raft;
No need to run any test for raft module;
NO need to run any test for raftexample;
Signed-off-by: Benjamin Wang <wachao@vmware.com>