From 5dff827ab8bdad4c08d89d12e60d1be40c65c5d0 Mon Sep 17 00:00:00 2001 From: Brent Eritou Date: Wed, 17 Jan 2024 05:50:44 -0500 Subject: [PATCH] chore: upgrade Vale to 3.0.5 (#538) Fix typos caught by error-level alerting for Repetition style violations. Closes: #537 --- .github/workflows/linting.yml | 2 +- .vale.ini | 1 - build/license.json | 2 +- .../pages/development-process-js.adoc | 2 +- .../javascript/pages/eventsourced.adoc | 2 +- .../javascript/pages/value-entity.adoc | 2 +- .../README.md | 4 +- .../js/js-valueentity-shopping-cart/README.md | 4 +- samples/js/valueentity-counter/README.md | 4 +- .../README.md | 4 +- samples/ts/ts-valueentity-counter/README.md | 4 +- .../ts/ts-valueentity-shopping-cart/README.md | 4 +- styles/Vocab/Base/accept.txt | 101 --------------- styles/config/vocabularies/Base/accept.txt | 116 ++++++++++++++++++ .../vocabularies}/Base/reject.txt | 0 15 files changed, 127 insertions(+), 125 deletions(-) delete mode 100644 styles/Vocab/Base/accept.txt create mode 100644 styles/config/vocabularies/Base/accept.txt rename styles/{Vocab => config/vocabularies}/Base/reject.txt (100%) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index e080a21f..42e5e198 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -22,7 +22,7 @@ jobs: # v2.0.1 uses: errata-ai/vale-action@c4213d4de3d5f718b8497bd86161531c78992084 with: - version: 2.30.0 + version: 3.0.5 files: '["docs/dev", "docs/src", "samples"]' fail_on_error: true filter_mode: nofilter diff --git a/.vale.ini b/.vale.ini index 8bc11d6f..d9ccfbc9 100644 --- a/.vale.ini +++ b/.vale.ini @@ -9,7 +9,6 @@ Packages = Microsoft, write-good BasedOnStyles = Vale, Lightbend, write-good # Override the alert level of certain styles -Vale.Repetition = warning Lightbend.Contractions = suggestion Lightbend.Avoid = warning write-good.So = suggestion diff --git a/build/license.json b/build/license.json index f3c94549..18314196 100644 --- a/build/license.json +++ b/build/license.json @@ -12,7 +12,7 @@ "**/*.yml", "samples/*/*/lib/generated", "sdk/test/*.desc", - "styles/Vocab/Base/", + "styles/config/vocabularies/Base", "tck/generated", "testkit/integration-test/proto.*" ], diff --git a/docs/src/modules/developing/pages/development-process-js.adoc b/docs/src/modules/developing/pages/development-process-js.adoc index 6ceeb2d6..2557e932 100644 --- a/docs/src/modules/developing/pages/development-process-js.adoc +++ b/docs/src/modules/developing/pages/development-process-js.adoc @@ -39,7 +39,7 @@ Actions are stateless functions that can be triggered by gRPC or HTTP calls. The === Entities -Stateful services encapsulate business logic in in Value Entities, Event Sourced Entities, or Replicated Entities. At runtime, command messages invoke operations on Entities. A command may only act on one Entity at a time. +Stateful services encapsulate business logic in Value Entities, Event Sourced Entities, or Replicated Entities. At runtime, command messages invoke operations on Entities. A command may only act on one Entity at a time. TIP: To learn more about Kalix entities see xref:javascript:value-entity.adoc[Implement a Value Entity], xref:javascript:eventsourced.adoc[Implement an Event Sourced Entity], and xref:javascript:replicated-entity.adoc[Implement a Replicated Entity]. diff --git a/docs/src/modules/javascript/pages/eventsourced.adoc b/docs/src/modules/javascript/pages/eventsourced.adoc index 30063fba..f882ee8f 100644 --- a/docs/src/modules/javascript/pages/eventsourced.adoc +++ b/docs/src/modules/javascript/pages/eventsourced.adoc @@ -17,7 +17,7 @@ The following shows an example shopping cart definition in a `domain.proto` file include::example$domain.proto[] ---- -In this file, the `Cart` message represents the state snapshot, while `ItemAdded` and `ItemRemoved` are events. Note the event names are in past tense--events are facts, indisputable things that happened in the past. A fact never becomes false: after an item has been added to a shopping cart, it never becomes untrue that that item was added to the cart. It can be removed, but that doesn't change the fact that it was added, it only changes the current state of the cart. The names of events should always be in past tense to reflect the indisputable fact that they represent. +In this file, the `Cart` message represents the state snapshot, while `ItemAdded` and `ItemRemoved` are events. Note the event names are in past tense--events are facts, indisputable things that happened in the past. A fact never becomes false: after an item has been added to a shopping cart, it never becomes untrue that the item was added to the cart. It can be removed, but that doesn't change the fact that it was added, it only changes the current state of the cart. The names of events should always be in past tense to reflect the indisputable fact that they represent. == Creating an entity diff --git a/docs/src/modules/javascript/pages/value-entity.adoc b/docs/src/modules/javascript/pages/value-entity.adoc index e4f8718d..f692278b 100644 --- a/docs/src/modules/javascript/pages/value-entity.adoc +++ b/docs/src/modules/javascript/pages/value-entity.adoc @@ -37,7 +37,7 @@ The `counter_api.proto` file defines the commands we can send to the Counter ser include::example$valueentity-counter/proto/counter_api.proto[] ---- <1> Import the Kalix protobuf annotations, or options. -<2> Any classes generated from this protobuf file will be be nested in the package hierarchy: `com.example`. +<2> Any classes generated from this protobuf file will be nested in the package hierarchy: `com.example`. <3> Protobuf messages describe the Commands that the service handles. They may contain other messages to represent structured data. <4> Every Command must contain a `string` field that contains the entity ID and is marked with the `(kalix.field).entity_key` option. diff --git a/samples/js/js-replicated-entity-shopping-cart/README.md b/samples/js/js-replicated-entity-shopping-cart/README.md index 093c11c9..64843e52 100644 --- a/samples/js/js-replicated-entity-shopping-cart/README.md +++ b/samples/js/js-replicated-entity-shopping-cart/README.md @@ -6,9 +6,7 @@ While designing your service it is useful to read [designing services](https://d ## Developing -This project has a bare-bones skeleton service ready to go, but in order to adapt and extend it it may be useful to -read up on [developing services](https://docs.kalix.io/developing/index.html) and in -particular the [JavaScript section](https://docs.kalix.io/javascript/index.html) +This project has a bare-bones skeleton service ready to go, but to adapt and extend it, reading up on [developing services](https://docs.kalix.io/developing/index.html), especially the [JavaScript section](https://docs.kalix.io/javascript/index.html), may be useful. ## Prerequisites diff --git a/samples/js/js-valueentity-shopping-cart/README.md b/samples/js/js-valueentity-shopping-cart/README.md index c4d4bf98..8f7a25a6 100644 --- a/samples/js/js-valueentity-shopping-cart/README.md +++ b/samples/js/js-valueentity-shopping-cart/README.md @@ -6,9 +6,7 @@ While designing your service it is useful to read [designing services](https://d ## Developing -This project has a bare-bones skeleton service ready to go, but in order to adapt and -extend it it may be useful to read up on [developing services](https://docs.kalix.io/developing/index.html) -and in particular the [JavaScript section](https://docs.kalix.io/javascript/index.html) +This project has a bare-bones skeleton service ready to go, but to adapt and extend it, reading up on [developing services](https://docs.kalix.io/developing/index.html), especially the [JavaScript section](https://docs.kalix.io/javascript/index.html), may be useful. ## Prerequisites diff --git a/samples/js/valueentity-counter/README.md b/samples/js/valueentity-counter/README.md index 00691dd8..bc38a9df 100644 --- a/samples/js/valueentity-counter/README.md +++ b/samples/js/valueentity-counter/README.md @@ -6,9 +6,7 @@ While designing your service it is useful to read [designing services](https://d ## Developing -This project has a functioning service ready to adapt and -extend it it may be useful to read up on [developing services](https://docs.kalix.io/developing/index.html) -and in particular the [JavaScript section](https://docs.kalix.io/javascript/index.html) +This project has a bare-bones skeleton service ready to go, but to adapt and extend it, reading up on [developing services](https://docs.kalix.io/developing/index.html), especially the [JavaScript section](https://docs.kalix.io/javascript/index.html), may be useful. ## Prerequisites diff --git a/samples/ts/ts-replicated-entity-shopping-cart/README.md b/samples/ts/ts-replicated-entity-shopping-cart/README.md index d14fa9bf..afc42910 100644 --- a/samples/ts/ts-replicated-entity-shopping-cart/README.md +++ b/samples/ts/ts-replicated-entity-shopping-cart/README.md @@ -6,9 +6,7 @@ While designing your service it is useful to read [designing services](https://d ## Developing -This project has a bare-bones skeleton service ready to go, but in order to adapt and extend it it may be useful to -read up on [developing services](https://docs.kalix.io/developing/index.html) and in -particular the [JavaScript section](https://docs.kalix.io/javascript/index.html) +This project has a bare-bones skeleton service ready to go, but to adapt and extend it, reading up on [developing services](https://docs.kalix.io/developing/index.html), especially the [JavaScript section](https://docs.kalix.io/javascript/index.html), may be useful. ## Prerequisites diff --git a/samples/ts/ts-valueentity-counter/README.md b/samples/ts/ts-valueentity-counter/README.md index 4fc4894a..a61a0242 100644 --- a/samples/ts/ts-valueentity-counter/README.md +++ b/samples/ts/ts-valueentity-counter/README.md @@ -6,9 +6,7 @@ While designing your service it is useful to read [designing services](https://d ## Developing -This project has a functioning service ready to adapt and -extend it it may be useful to read up on [developing services](https://docs.kalix.io/developing/index.html) -and in particular the [JavaScript section](https://docs.kalix.io/javascript/index.html) +This project has a bare-bones skeleton service ready to go, but to adapt and extend it, reading up on [developing services](https://docs.kalix.io/developing/index.html), especially the [JavaScript section](https://docs.kalix.io/javascript/index.html), may be useful. ## Prerequisites diff --git a/samples/ts/ts-valueentity-shopping-cart/README.md b/samples/ts/ts-valueentity-shopping-cart/README.md index 66e3d0dd..623fde1a 100644 --- a/samples/ts/ts-valueentity-shopping-cart/README.md +++ b/samples/ts/ts-valueentity-shopping-cart/README.md @@ -6,9 +6,7 @@ While designing your service it is useful to read [designing services](https://d ## Developing -This project has a bare-bones skeleton service ready to go, but in order to adapt and -extend it it may be useful to read up on [developing services](https://docs.kalix.io/developing/index.html) -and in particular the [JavaScript section](https://docs.kalix.io/javascript/index.html) +This project has a bare-bones skeleton service ready to go, but to adapt and extend it, reading up on [developing services](https://docs.kalix.io/developing/index.html), especially the [JavaScript section](https://docs.kalix.io/javascript/index.html), may be useful. ## Prerequisites diff --git a/styles/Vocab/Base/accept.txt b/styles/Vocab/Base/accept.txt deleted file mode 100644 index fb64ad0a..00000000 --- a/styles/Vocab/Base/accept.txt +++ /dev/null @@ -1,101 +0,0 @@ -Ack -ACLs -Akka -autoscaling -Autoscaling -kalix -Kalix -antora -Antora -api -API -async -backoffice -Backoffice -boolean -Boolean -brokerless -Buildah -CA's -chatbots -Chatbots -Chai -classname -codegen -config -configs -CRDTs -Ctrl -deserialize -dev -Dockerfile -entityId -failover -github -GitHub -grpcui -grpcurl -gRPCurl -hostname -hostnames -https -interconnectivity -iss -iterable -jwts -JWTs -kafka -Kafka -lightbend -Lightbend -matchers -namespace -newname -npm -npx -onboarding -passivates -plaintext -preconfigured -proto -protobuf -Protobuf -quickstarts -Quickstarts -recurse -redeliveries -rpc -RPC -sbt -scala -Scala -SDKs -SREs -serializable -serverless -Serverless -sharding -signup -smallstep -src -stackdriver -Stackdriver -subcommand -telemedicine -Telemedicine -Tink -tokenid -tokenization -transcoded -transcoding -Transcoding -unary -unexpose -Unexpose -unnested -userid -UUID -UUIDs -zsh -Zsh -dev diff --git a/styles/config/vocabularies/Base/accept.txt b/styles/config/vocabularies/Base/accept.txt new file mode 100644 index 00000000..dec527ae --- /dev/null +++ b/styles/config/vocabularies/Base/accept.txt @@ -0,0 +1,116 @@ +(?# see https://vale.sh/docs/topics/vocab/#case-sensitivity for explanation of case sensitivity configuration) +Ack +ACLs +Aiven +Akka +allowMethods +allowOrigins +[Aa]ntora +(?i)API +[Aa]rchitecting +async +[Aa]utoscaling +[Bb]ackoffice +[Bb]oolean +brokerless +Buildah +CA's +caSecret +[Cc]hatbots +classname +clientCertificate +codegen +config +configs +corsPolicy +CRDTs +Ctrl +defaultMode +declaratively +deserialize +dev +facto +enum +env +failover +[Gg]itHub +googleCloud +grpcui +(?i)gRPCurl +hasPrefix +hasSuffix +hostname +hostnames +httpBasic +https +[Ii]dempotency +instanceType +interconnectivity +iss +JUnit +(?i)JWT +(?i)JWTs +[Kk]afka +[Kk]alix +keyId +[Ll]ightbend +matchers +maxInstances +minInstances +mountPath +namespace +newname +npx +npm +onboarding +(?i)OTLP +passivates +passwordHashes +plaintext +preconfigured +[Pp]rometheus +proto +[Pp]rotobuf +[Qq]uantiles +[Qq]uickstarts +recurse +redeliveries +(?i)RPC +sbt +(?i)Scala +SDKs +secretName +serverCertificate +Serverless +serverless +serviceAccountSecret +sharding +signup +smallstep +sourceType +[Ss]plunk +src +SREs +[Ss]tackdriver +subcommand +subjectMatches +subpage +[Tt]elemedicine +[Tt]estKit +Tink +(?i)TLS +tokenid +tokenSecret +transcoded +[Tt]ranscoding +unary +unencrypted +[Uu]nexpose +unnested +unsets +upsert +upserting +userid +valueFrom +volumeMounts +[Zz]sh diff --git a/styles/Vocab/Base/reject.txt b/styles/config/vocabularies/Base/reject.txt similarity index 100% rename from styles/Vocab/Base/reject.txt rename to styles/config/vocabularies/Base/reject.txt