From b84ab54c91b0415753950890392b0b27196405a9 Mon Sep 17 00:00:00 2001 From: joshuawilson Date: Fri, 19 Feb 2021 10:09:22 -0500 Subject: [PATCH] fix(spelling): correct spelling and add unknown words to dict --- .vscode/settings.json | 83 +++++++++++++++++++- src/cli/config.ts | 2 +- src/cli/kn-api.ts | 10 +-- src/cli/virtualfs.ts | 2 +- src/knative/knativeItem.ts | 2 +- test/cli/virtualfs.test.ts | 2 +- test/servingTree/servingDataProvider.test.ts | 4 +- test/util/filters.test.ts | 2 +- 8 files changed, 94 insertions(+), 13 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a5ad6c5c..a9e3edc0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,5 +22,86 @@ "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": false - } + }, + "cSpell.words": [ + "APIV", + "DDTHH", + "Dexample", + "Dknative", + "Dockal", + "Drevision", + "Dservice", + "Dtest", + "Knative", + "Kubectl", + "Kubelet", + "Kubernetes", + "Ondrej", + "Parens", + "SCTP", + "SIGKILL", + "Serializable", + "USERPROFILE", + "Unprocessable", + "apiextensions", + "apiserver", + "autoscaler", + "camelcase", + "cobertura", + "codecov", + "coverconfig", + "dbaeumer", + "decache", + "devel", + "entrypoint", + "eqeqeq", + "errorable", + "esbenp", + "extest", + "finalizer", + "finalizers", + "fspath", + "globby", + "hasha", + "idempotence", + "instrumenter", + "istio", + "knmsx", + "knreadonly", + "knrp", + "knservice", + "knvfs", + "kservice", + "ksvc", + "kube", + "kubeconfig", + "lcov", + "loadknativecore", + "loadothercore", + "loglevel", + "mtchannel", + "notifs", + "openshift", + "podspecable", + "quarkus", + "queryable", + "qycgp", + "redhat", + "repos", + "reqs", + "rhdevelopers", + "routable", + "runtime's", + "serviceaccount", + "sinkbindings", + "sinonjs", + "subresources", + "thenable", + "triggerb", + "triggercdb", + "triggercef", + "triggerfcdd", + "virtualfs", + "vsix" + ] } diff --git a/src/cli/config.ts b/src/cli/config.ts index 61b126a0..8c7bfcdb 100644 --- a/src/cli/config.ts +++ b/src/cli/config.ts @@ -52,7 +52,7 @@ export const enum SourceType { export interface Config { kind: Kind; - apiversion: string; + apiVersion: string; ComponentSettings: ComponentSettings; } diff --git a/src/cli/kn-api.ts b/src/cli/kn-api.ts index 9c749c51..1e0c2e1f 100644 --- a/src/cli/kn-api.ts +++ b/src/cli/kn-api.ts @@ -24,11 +24,11 @@ export class KnAPI { * * @param createServiceObj - a CreateService object that requires name and URL. * - * #### Create a service 'mysvc' using image at dev.local/ns/image:latest - * `kn service create mysvc --image dev.local/ns/image:latest` + * #### Create a service 'mySvc' using image at dev.local/ns/image:latest + * `kn service create mySvc --image dev.local/ns/image:latest` * * #### Create a service with multiple environment variables - * `kn service create mysvc --env KEY1=VALUE1 --env KEY2=VALUE2 --image dev.local/ns/image:latest` + * `kn service create mySvc --env KEY1=VALUE1 --env KEY2=VALUE2 --image dev.local/ns/image:latest` * * #### Create or replace a service 's1' with image dev.local/ns/image:v2 using --force flag * if service 's1' doesn't exist, it's just a normal create operation @@ -37,8 +37,8 @@ export class KnAPI { * #### Create or replace environment variables of service 's1' using --force flag * `kn service create --force s1 --env KEY1=NEW_VALUE1 --env NEW_KEY2=NEW_VALUE2 --image dev.local/ns/image:v1` * - * #### Create service 'mysvc' with port 80 - * `kn service create mysvc --port 80 --image dev.local/ns/image:latest` + * #### Create service 'mySvc' with port 80 + * `kn service create mySvc --port 80 --image dev.local/ns/image:latest` * * #### Create or replace default resources of a service 's1' using --force flag * * (earlier configured resource requests and limits will be replaced with default) diff --git a/src/cli/virtualfs.ts b/src/cli/virtualfs.ts index 32647b82..7552b245 100644 --- a/src/cli/virtualfs.ts +++ b/src/cli/virtualfs.ts @@ -46,7 +46,7 @@ export function vfsUri( const docName = `${context}-${name}.${outputFormat}`; const nonce = new Date().getTime(); const nsQuery = namespace ? `ns=${namespace}&` : ''; - // "knmsx://loadknativecore/serviceknative-tutorial-greeter.yaml?contextValue=service&name=knative-tutorial-greeter&_=1593030763939" + // "knmsx://loadknativecore/serviceKnative-tutorial-greeter.yaml?contextValue=service&name=knative-tutorial-greeter&_=1593030763939" const uri = `${schema}://${KN_RESOURCE_AUTHORITY}/${docName}?${nsQuery}contextValue=${context}&name=${name}&_=${nonce}`; return Uri.parse(uri); } diff --git a/src/knative/knativeItem.ts b/src/knative/knativeItem.ts index 0fd9e8fa..58a8b6c9 100644 --- a/src/knative/knativeItem.ts +++ b/src/knative/knativeItem.ts @@ -13,7 +13,7 @@ export class KnativeItem {} * All non-undefined array elements are sorted according to the return value of the compare function (all undefined elements are sorted to the end of the array, with no call to compareFunction). If a and b are two elements being compared, then: * * If compareFunction(a, b) returns less than 0, sort a to an index lower than b (i.e. a comes first). - * If compareFunction(a, b) returns 0, leave a and b unchanged with respect to each other, but sorted with respect to all different elements. Note: the ECMAscript standard does not guarantee this behavior, thus, not all browsers (e.g. Mozilla versions dating back to at least 2003) respect this. + * If compareFunction(a, b) returns 0, leave a and b unchanged with respect to each other, but sorted with respect to all different elements. Note: the ECMAScript standard does not guarantee this behavior, thus, not all browsers (e.g. Mozilla versions dating back to at least 2003) respect this. * If compareFunction(a, b) returns greater than 0, sort b to an index lower than a (i.e. b comes first). * compareFunction(a, b) must always return the same value when given a specific pair of elements a and b as its two arguments. If inconsistent results are returned, then the sort order is undefined. * diff --git a/test/cli/virtualfs.test.ts b/test/cli/virtualfs.test.ts index 706a6dbe..e5d313eb 100644 --- a/test/cli/virtualfs.test.ts +++ b/test/cli/virtualfs.test.ts @@ -41,7 +41,7 @@ suite('VirtualFileSystem', () => { 'knreadonly://loadknativecore/service-example.yaml?ns%3DtestNamespace%26contextValue%3Dservice%26name%3Dexample%26_%3D1594328823824', ); const _uriExternalFileNotKnative = Uri.parse( - 'knreadonly://loadnothercore/service-example.yaml?contextValue%3Dservice%26name%3Dexample%26_%3D1594328823824', + 'knreadonly://loadothercore/service-example.yaml?contextValue%3Dservice%26name%3Dexample%26_%3D1594328823824', ); const _uriWorkspaceRoot = Uri.file(`${pth.sep}workspace${pth.sep}root${pth.sep}test${pth.sep}uri`); const testLocalServiceContent = `apiVersion: serving.knative.dev/v1 kind: Service metadata: annotations: serving.knative.dev/creator: system:admin serving.knative.dev/lastModifier: system:admin creationTimestamp: "2020-07-09T02:39:32Z" generation: 1 name: local namespace: a-serverless-example spec: template: metadata: annotations: client.knative.dev/user-image: quay.io/rhdevelopers/knative-tutorial-greeter:quarkus creationTimestamp: null name: local-qycgp-1 spec: containerConcurrency: 0 containers: - image: quay.io/rhdevelopers/knative-tutorial-greeter:quarkus name: user-container readinessProbe: successThreshold: 1 tcpSocket: port: 0 resources: {} timeoutSeconds: 300 traffic: - latestRevision: true percent: 100 `; diff --git a/test/servingTree/servingDataProvider.test.ts b/test/servingTree/servingDataProvider.test.ts index 5627565a..c0779fa5 100644 --- a/test/servingTree/servingDataProvider.test.ts +++ b/test/servingTree/servingDataProvider.test.ts @@ -631,13 +631,13 @@ status: // const spy = sandbox.spy(sdp.onDidChangeTreeDataEmitter, 'fire'); sdp.pollRefresh(); // eslint-disable-next-line no-console - // console.log(`ServingDataProvidertest.Poll Refresh before timeout ${Math.round(new Date().getTime() / 1000)}`); + // console.log(`ServingDataProviderTest.Poll Refresh before timeout ${Math.round(new Date().getTime() / 1000)}`); // give the poll enough time to call // eslint-disable-next-line @typescript-eslint/await-thenable // await sleep(60001); // eslint-disable-next-line no-console - // console.log(`ServingDataProvidertest.Poll Refresh after timeout ${Math.round(new Date().getTime() / 1000)}`); + // console.log(`ServingDataProviderTest.Poll Refresh after timeout ${Math.round(new Date().getTime() / 1000)}`); // turn it off so that it doesn't keep polling // sdp.stopPollRefresh(); diff --git a/test/util/filters.test.ts b/test/util/filters.test.ts index b54487ef..065e4ee0 100644 --- a/test/util/filters.test.ts +++ b/test/util/filters.test.ts @@ -32,7 +32,7 @@ suite('Filters utility class', () => { test('should not replace similar password-like string or parameter annotation in given text', () => { expect( Filters.filterPassword( - `some string and given parameter --p 'not exacltyPass' or --p='again not a password' neither -p=someValue`, + `some string and given parameter --p 'not exactlyPass' or --p='again not a password' neither -p=someValue`, ), ).to.include('-p **********'); });