Skip to content

Commit c9debdc

Browse files
authored
Merge pull request #28954 from swiftslee/main
update some typo produced by scripts/verify-spelling.sh
2 parents b35813a + 62f4b02 commit c9debdc

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

content/en/docs/tasks/manage-kubernetes-objects/kustomization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ metadata:
308308
type: Opaque
309309
```
310310

311-
Like ConfigMaps, generated Secrets can be used in Deployments by refering to the name of the secretGenerator:
311+
Like ConfigMaps, generated Secrets can be used in Deployments by referring to the name of the secretGenerator:
312312

313313
```shell
314314
# Create a password.txt file

scripts/.spelling_failures

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
content/en/blog/_posts/2016-05-00-Coreosfest2016-Kubernetes-Community.md
2+
content/en/blog/_posts/2016-10-00-Dynamic-Provisioning-And-Storage-In-Kubernetes.md
3+
content/en/blog/_posts/2017-02-00-Postgresql-Clusters-Kubernetes-Statefulsets.md
4+
content/en/blog/_posts/2018-06-28-Airflow-Kubernetes-Operator.md
5+
content/en/blog/_posts/2018-10-02-network-bootable-farm-with-ltsp.md
6+
content/en/blog/_posts/2019-03-19-kubeedge-k8s-based-edge-intro.md
7+
content/en/blog/_posts/2020-05-06-third-party-dual-sourced-content.md
8+
content/en/blog/_posts/2020-05-21-wsl2-dockerdesktop-k8s.md
9+
content/en/blog/_posts/2020-07-27-kubernetes-1-17-release-interview.md
10+

scripts/verify-spelling.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
# limitations under the License.
1616
##########
1717
# This script verifies mispellings in location. Today it only supports
18-
# verifying English locale but can be modified in a future to support
19-
# also other locales.
18+
# verifying English locale but can be modified in a future to support
19+
# other locales also
2020
# You need to run this script inside the root directory of "website" git repo.
21-
#
21+
#
2222
# Syntax: verify-spelling.sh LOCALE
2323
# Example: verify-spelling.sh en
2424
# If no locale is passed, it will assume "en"
25-
#
25+
#
2626
# Requirements:
2727
# - go v1.14 or superior version
2828

@@ -34,6 +34,8 @@ set -o pipefail
3434

3535
TOOL_VERSION="v0.3.4"
3636

37+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
38+
3739
LANGUAGE="${1:-en}"
3840
# cd to the root path
3941
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
@@ -60,10 +62,15 @@ cd "${ROOT}"
6062
RES=0
6163
echo "Checking spelling..."
6264
ERROR_LOG="${TMP_DIR}/errors.log"
63-
git ls-files | grep content/${LANGUAGE} | xargs misspell > "${ERROR_LOG}"
65+
66+
# NOTE we usually don't correct old blog articles, so we ignore them in
67+
# this file.
68+
skipping_file="${KUBE_ROOT}/scripts/.spelling_failures"
69+
failing_packages=$(sed "s| | -e |g" "${skipping_file}")
70+
git ls-files -z | grep --null-data "^content/${LANGUAGE}" | grep --null-data -v -e "${failing_packages}" | xargs -0 -r misspell > "${ERROR_LOG}"
6471
if [[ -s "${ERROR_LOG}" ]]; then
6572
sed 's/^/error: /' "${ERROR_LOG}" # add 'error' to each line to highlight in e2e status
66-
echo "Found spelling errors!"
73+
echo "Found spelling errors!" >&2
6774
RES=1
6875
fi
6976
exit "${RES}"

0 commit comments

Comments
 (0)