Skip to content

Commit a7b4459

Browse files
authored
Merge pull request kubernetes#87379 from hase1128/add-comment-to-several-verify-scripts_3
Add comments in several hack/verify-*.sh(g-r)
2 parents 12203f3 + c8df27c commit a7b4459

11 files changed

+39
-8
lines changed

hack/verify-gofmt.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# GoFmt apparently is changing @ head...
17+
# This script checks whether the source codes need to be formatted or not by
18+
# `gofmt`. We should run `hack/update-gofmt.sh` if actually formats them.
19+
# Usage: `hack/verify-gofmt.sh`.
20+
# Note: GoFmt apparently is changing @ head...
1821

1922
set -o errexit
2023
set -o nounset

hack/verify-golint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# This script checks coding style for go language files in each
1818
# Kubernetes package by golint.
19-
# Usage: hack/verify-golint.sh
19+
# Usage: `hack/verify-golint.sh`.
2020

2121
set -o errexit
2222
set -o nounset

hack/verify-govet.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# This script is a vestigial redirection. Please do not add "real" logic.
17+
# This script vets all *.go files by running `go vet`. It is equivalent to
18+
# `make vet`.
19+
# Usage: `hack/verify-govet.sh` or `make vet`.
20+
# Note: This script is a vestigial redirection. Please do not add "real" logic.
1821

1922
set -o errexit
2023
set -o nounset

hack/verify-import-aliases.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
# This script verifies that all the imports have our preferred alias(es). The
18+
# preferred aliases for imports are listed in `hack/.import-aliases`.
19+
# Usage: `hack/verify-import-aliases.sh`.
20+
1721
set -o errexit
1822
set -o nounset
1923
set -o pipefail

hack/verify-import-boss.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
# This script checks import restrictions. The script looks for a file called
18+
# `.import-restrictions` in each directory, then all imports of the package are
19+
# checked against each "rule" in the file.
20+
# Usage: `hack/verify-import-boss.sh`.
21+
1722
set -o errexit
1823
set -o nounset
1924
set -o pipefail

hack/verify-imports.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
# This script checks restricted packages are imported or not and outputs the
18+
# result. Target directory's path and allowed packages against checking are
19+
# listed in `staging/publishing/import-restrictions.yaml`.
20+
# Usage: `hack/verify-imports.sh`.
21+
1722
set -o errexit
1823
set -o nounset
1924
set -o pipefail

hack/verify-linkcheck.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# This script extracts the links from types.go and .md files in pkg/api/,
1818
# pkg/apis/ and docs/ directories, checks the status code of the response, and
1919
# output the list of invalid links.
20-
# Usage: hack/verify-linkcheck.sh
20+
# Usage: `hack/verify-linkcheck.sh`.
2121

2222
set -o errexit
2323
set -o nounset

hack/verify-no-vendor-cycles.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
# This script checks whether packages under `vendor` directory have cyclic
18+
# dependencies on `main` or `staging` repositories.
19+
# Usage: `hack/verify-no-vendor-cycles.sh`.
20+
1721
set -o errexit
1822
set -o nounset
1923
set -o pipefail

hack/verify-openapi-spec.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
# This script checks whether updating of OpenAPI specification is needed or not.
18+
# We should run `hack/update-openapi-spec.sh` if OpenAPI specification is out of
19+
# date.
20+
# Usage: `hack/verify-openapi-spec.sh`.
21+
1722
set -o errexit
1823
set -o nounset
1924
set -o pipefail

hack/verify-pkg-names.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# Verify whether codes follow golang convention.
17+
# This script verifies whether codes follow golang convention.
18+
# Usage: `hack/verify-pkg-names.sh`.
1819

1920
set -o errexit
2021
set -o nounset

0 commit comments

Comments
 (0)