-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As `tools/mod` also contains the `go.mod` file. We should add it to the `module_dirs` variable, so that when executing `./scripts/fix.sh`, the proper checks and fixes can be applied. To address the issue of broken unit tests and code coverage due to the directory's lack of Go code, we've introduced a new mod.go file. This file acts as a placeholder, enabling tools like golangci-lint and go test to function correctly. --- Discovered when working on #18575 The directories are checked against the following: - Command: `find . -type f -name go.mod -exec dirname {} \;` - Output: ``` ./etcdutl . ./tools/testgrid-analysis ./tools/rw-heatmaps ./tools/mod ./etcdctl ./tests ./server ./api ./client/internal/v2 ./client/v3 ./client/pkg ./pkg ``` Signed-off-by: Chun-Hung Tseng <[email protected]>
- Loading branch information
1 parent
6c1fe4a
commit 117598a
Showing
4 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package mod | ||
|
||
// As this directory implements the pattern for tracking tool dependencies as documented here: | ||
// https://go.dev/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module | ||
// it doesn't contain any valid Go code directly. | ||
|
||
// This would break scripts for unit testing and coverage calculation. However, | ||
// to ensure tools like golangci-lint and go test run normally and perform go mod checks, | ||
// we've added this empty file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters