-
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 doc.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 aa7efbd
Showing
4 changed files
with
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2024 The etcd Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// 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. | ||
|
||
package mod |
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