diff --git a/content/en/docs/tasks/manage-kubernetes-objects/kustomization.md b/content/en/docs/tasks/manage-kubernetes-objects/kustomization.md index f391b37e09..cca985705b 100644 --- a/content/en/docs/tasks/manage-kubernetes-objects/kustomization.md +++ b/content/en/docs/tasks/manage-kubernetes-objects/kustomization.md @@ -308,7 +308,7 @@ metadata: type: Opaque ``` -Like ConfigMaps, generated Secrets can be used in Deployments by refering to the name of the secretGenerator: +Like ConfigMaps, generated Secrets can be used in Deployments by referring to the name of the secretGenerator: ```shell # Create a password.txt file diff --git a/scripts/.spelling_failures b/scripts/.spelling_failures new file mode 100644 index 0000000000..8b0d9e0815 --- /dev/null +++ b/scripts/.spelling_failures @@ -0,0 +1,10 @@ +content/en/blog/_posts/2016-05-00-Coreosfest2016-Kubernetes-Community.md +content/en/blog/_posts/2016-10-00-Dynamic-Provisioning-And-Storage-In-Kubernetes.md +content/en/blog/_posts/2017-02-00-Postgresql-Clusters-Kubernetes-Statefulsets.md +content/en/blog/_posts/2018-06-28-Airflow-Kubernetes-Operator.md +content/en/blog/_posts/2018-10-02-network-bootable-farm-with-ltsp.md +content/en/blog/_posts/2019-03-19-kubeedge-k8s-based-edge-intro.md +content/en/blog/_posts/2020-05-06-third-party-dual-sourced-content.md +content/en/blog/_posts/2020-05-21-wsl2-dockerdesktop-k8s.md +content/en/blog/_posts/2020-07-27-kubernetes-1-17-release-interview.md + diff --git a/scripts/verify-spelling.sh b/scripts/verify-spelling.sh index c259d65ddb..2871dfa76a 100755 --- a/scripts/verify-spelling.sh +++ b/scripts/verify-spelling.sh @@ -15,14 +15,14 @@ # limitations under the License. ########## # This script verifies mispellings in location. Today it only supports -# verifying English locale but can be modified in a future to support -# also other locales. +# verifying English locale but can be modified in a future to support +# other locales also # You need to run this script inside the root directory of "website" git repo. -# +# # Syntax: verify-spelling.sh LOCALE # Example: verify-spelling.sh en # If no locale is passed, it will assume "en" -# +# # Requirements: # - go v1.14 or superior version @@ -34,6 +34,8 @@ set -o pipefail TOOL_VERSION="v0.3.4" +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. + LANGUAGE="${1:-en}" # cd to the root path ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" @@ -60,10 +62,15 @@ cd "${ROOT}" RES=0 echo "Checking spelling..." ERROR_LOG="${TMP_DIR}/errors.log" -git ls-files | grep content/${LANGUAGE} | xargs misspell > "${ERROR_LOG}" + +# NOTE we usually don't correct old blog articles, so we ignore them in +# this file. +skipping_file="${KUBE_ROOT}/scripts/.spelling_failures" +failing_packages=$(sed "s| | -e |g" "${skipping_file}") +git ls-files -z | grep --null-data "^content/${LANGUAGE}" | grep --null-data -v -e "${failing_packages}" | xargs -0 -r misspell > "${ERROR_LOG}" if [[ -s "${ERROR_LOG}" ]]; then sed 's/^/error: /' "${ERROR_LOG}" # add 'error' to each line to highlight in e2e status - echo "Found spelling errors!" + echo "Found spelling errors!" >&2 RES=1 fi exit "${RES}"