From 46b4441ad17505d064ca911fc29679cc0b6b33b1 Mon Sep 17 00:00:00 2001 From: Thomas Tendyck Date: Tue, 23 Jan 2024 17:19:53 +0100 Subject: [PATCH] ci: update vale --- .github/workflows/docs-vale.yml | 10 ++-- .vale.ini | 8 +--- docs/docs/workflows/config.md | 8 ++-- docs/styles/Google/OptionalPlurals.yml | 12 ----- docs/styles/Google/Spelling.yml | 4 +- docs/styles/Google/Units.yml | 6 +-- docs/styles/Microsoft/Contractions.yml | 2 +- docs/styles/Microsoft/Foreign.yml | 3 +- docs/styles/Microsoft/Plurals.yml | 7 +++ docs/styles/Microsoft/Terms.yml | 10 ++-- .../vocabularies/edgeless}/accept.txt | 48 ++++++++++++------- 11 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 docs/styles/Google/OptionalPlurals.yml create mode 100644 docs/styles/Microsoft/Plurals.yml rename docs/styles/{Vocab/constellation => config/vocabularies/edgeless}/accept.txt (71%) diff --git a/.github/workflows/docs-vale.yml b/.github/workflows/docs-vale.yml index 0a3317cb1d..9feacba51b 100644 --- a/.github/workflows/docs-vale.yml +++ b/.github/workflows/docs-vale.yml @@ -12,7 +12,7 @@ on: - "docs/**" jobs: - prose: + vale: runs-on: ubuntu-22.04 steps: - name: Checkout @@ -21,11 +21,7 @@ jobs: ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} - name: Vale - uses: errata-ai/vale-action@c4213d4de3d5f718b8497bd86161531c78992084 # tag=v2.0.1 + uses: errata-ai/vale-action@3f7188c866bcb3259339a09f517d7c4a8838303c # tag=reviewdog with: - version: 2.17.0 files: docs/docs - env: - # Required, set by GitHub actions automatically: - # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + fail_on_error: true diff --git a/.vale.ini b/.vale.ini index 36a01c5ef6..4b481e1215 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,13 +1,9 @@ StylesPath = docs/styles -Vocab = constellation - -# IgnoredScopes specifies inline-level HTML tags to ignore. -# These tags may occur in an active scope (unlike SkippedScopes, skipped entirely) but their content still will not raise any alerts. -# Default: ignore `code` and `tt`. -IgnoredScopes = code, tt, img +Vocab = edgeless [*.md] BasedOnStyles = Vale, Microsoft, Google +Vale.Terms = NO # decrease to suggestion Microsoft.Foreign = suggestion # conflicts with Microsoft.Contractions diff --git a/docs/docs/workflows/config.md b/docs/docs/workflows/config.md index 165100b819..165a919db8 100644 --- a/docs/docs/workflows/config.md +++ b/docs/docs/workflows/config.md @@ -46,20 +46,20 @@ Constellation supports the following VM types: -By default, Constellation uses `Standard_DC4as_v5` CVMs (4 vCPUs, 16 GB RAM) to create your cluster. Optionally, you can switch to a different VM type by modifying **instanceType** in the configuration file. For CVMs, any VM type with a minimum of 4 vCPUs from the [DCasv5 & DCadsv5](https://docs.microsoft.com/en-us/azure/virtual-machines/dcasv5-dcadsv5-series) or [ECasv5 & ECadsv5](https://docs.microsoft.com/en-us/azure/virtual-machines/ecasv5-ecadsv5-series) families is supported. +By default, Constellation uses `Standard_DC4as_v5` CVMs (4 vCPUs, 16 GB RAM) to create your cluster. Optionally, you can switch to a different VM type by modifying `instanceType` in the configuration file. For CVMs, any VM type with a minimum of 4 vCPUs from the [DCasv5 & DCadsv5](https://docs.microsoft.com/en-us/azure/virtual-machines/dcasv5-dcadsv5-series) or [ECasv5 & ECadsv5](https://docs.microsoft.com/en-us/azure/virtual-machines/ecasv5-ecadsv5-series) families is supported. You can also run `constellation config instance-types` to get the list of all supported options. -By default, Constellation uses `n2d-standard-4` VMs (4 vCPUs, 16 GB RAM) to create your cluster. Optionally, you can switch to a different VM type by modifying **instanceType** in the configuration file. Supported are all machines with a minimum of 4 vCPUs from the [C2D](https://cloud.google.com/compute/docs/compute-optimized-machines#c2d_machine_types) or [N2D](https://cloud.google.com/compute/docs/general-purpose-machines#n2d_machines) family. You can run `constellation config instance-types` to get the list of all supported options. +By default, Constellation uses `n2d-standard-4` VMs (4 vCPUs, 16 GB RAM) to create your cluster. Optionally, you can switch to a different VM type by modifying `instanceType` in the configuration file. Supported are all machines with a minimum of 4 vCPUs from the [C2D](https://cloud.google.com/compute/docs/compute-optimized-machines#c2d_machine_types) or [N2D](https://cloud.google.com/compute/docs/general-purpose-machines#n2d_machines) family. You can run `constellation config instance-types` to get the list of all supported options. By default, Constellation uses `m6a.xlarge` VMs (4 vCPUs, 16 GB RAM) to create your cluster. -Optionally, you can switch to a different VM type by modifying **instanceType** in the configuration file. +Optionally, you can switch to a different VM type by modifying `instanceType` in the configuration file. If you are using the default attestation variant `awsSEVSNP`, you can use the instance types described in [AWS's AMD SEV-SNP docs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snp-requirements.html). Please mind the region restrictions mentioned in the [Getting started](../getting-started/first-steps.md#create-a-cluster) section. @@ -70,7 +70,7 @@ The Constellation CLI can also print the supported instance types with: `constel -Fill the desired VM type into the **instanceType** fields in the `constellation-conf.yml` file. +Fill the desired VM type into the `instanceType` fields in the `constellation-conf.yml` file. ## Creating additional node groups diff --git a/docs/styles/Google/OptionalPlurals.yml b/docs/styles/Google/OptionalPlurals.yml deleted file mode 100644 index f858ea6fee..0000000000 --- a/docs/styles/Google/OptionalPlurals.yml +++ /dev/null @@ -1,12 +0,0 @@ -extends: existence -message: "Don't use plurals in parentheses such as in '%s'." -link: 'https://developers.google.com/style/plurals-parentheses' -level: error -nonword: true -action: - name: edit - params: - - remove - - '(s)' -tokens: - - '\b\w+\(s\)' diff --git a/docs/styles/Google/Spelling.yml b/docs/styles/Google/Spelling.yml index 57acb88414..527ac07d31 100644 --- a/docs/styles/Google/Spelling.yml +++ b/docs/styles/Google/Spelling.yml @@ -5,4 +5,6 @@ ignorecase: true level: warning tokens: - '(?:\w+)nised?' - - '(?:\w+)logue' + - 'colour' + - 'labour' + - 'centre' diff --git a/docs/styles/Google/Units.yml b/docs/styles/Google/Units.yml index 379fad6b8e..53522ab2de 100644 --- a/docs/styles/Google/Units.yml +++ b/docs/styles/Google/Units.yml @@ -1,8 +1,8 @@ extends: existence message: "Put a nonbreaking space between the number and the unit in '%s'." -link: 'https://developers.google.com/style/units-of-measure' +link: "https://developers.google.com/style/units-of-measure" nonword: true level: error tokens: - - \d+(?:B|kB|MB|GB|TB) - - \d+(?:ns|ms|s|min|h|d) + - \b\d+(?:B|kB|MB|GB|TB) + - \b\d+(?:ns|ms|s|min|h|d) diff --git a/docs/styles/Microsoft/Contractions.yml b/docs/styles/Microsoft/Contractions.yml index ded330f797..8c81dcbce7 100644 --- a/docs/styles/Microsoft/Contractions.yml +++ b/docs/styles/Microsoft/Contractions.yml @@ -22,7 +22,7 @@ swap: should not: shouldn't - 'that is(?!\.)': that's + "that is(?![.,])": that's 'that''s(?=\.)': that is 'they are(?!\.)': they're diff --git a/docs/styles/Microsoft/Foreign.yml b/docs/styles/Microsoft/Foreign.yml index d37835a5d9..0d3d6002a9 100644 --- a/docs/styles/Microsoft/Foreign.yml +++ b/docs/styles/Microsoft/Foreign.yml @@ -9,4 +9,5 @@ action: swap: '\b(?:eg|e\.g\.)[\s,]': for example '\b(?:ie|i\.e\.)[\s,]': that is - + '\b(?:viz\.)[\s,]': namely + '\b(?:ergo)[\s,]': therefore diff --git a/docs/styles/Microsoft/Plurals.yml b/docs/styles/Microsoft/Plurals.yml new file mode 100644 index 0000000000..1bb6660ade --- /dev/null +++ b/docs/styles/Microsoft/Plurals.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't add '%s' to a singular noun. Use plural instead." +ignorecase: true +level: error +link: https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/s/s-es +raw: + - '\(s\)|\(es\)' diff --git a/docs/styles/Microsoft/Terms.yml b/docs/styles/Microsoft/Terms.yml index e41ff74b7a..7708900ebb 100644 --- a/docs/styles/Microsoft/Terms.yml +++ b/docs/styles/Microsoft/Terms.yml @@ -1,5 +1,7 @@ extends: substitution message: "Prefer '%s' over '%s'." +# term preference should be based on microsoft style guide, such as +link: https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/adapter level: warning ignorecase: true action: @@ -24,10 +26,8 @@ swap: anti-spyware: antispyware anti-virus: antivirus appendixes: appendices - artificial intelligence: artificial intelligence - assembler: assembly language - bpp: bpp - bps: bps + artificial intelligence: AI + '(?:assembler|machine language)': assembly language caap: CaaP conversation-as-a-platform: conversation as a platform eb: EB @@ -39,5 +39,3 @@ swap: pb: PB tb: TB zb: ZB - viz: namely - ergo: therefore diff --git a/docs/styles/Vocab/constellation/accept.txt b/docs/styles/config/vocabularies/edgeless/accept.txt similarity index 71% rename from docs/styles/Vocab/constellation/accept.txt rename to docs/styles/config/vocabularies/edgeless/accept.txt index 59cb8c22cc..6220f0553b 100644 --- a/docs/styles/Vocab/constellation/accept.txt +++ b/docs/styles/config/vocabularies/edgeless/accept.txt @@ -2,69 +2,81 @@ Affero agent Ansys Asciinema +ASG auditable autoscaler -[Aa]utoscaling +autoscaling AWS -aws backend Bazel -benchmarked -[Bb]ootloader +bootloader Bootstrapper -[Cc]loud +cloud config +CPU +CRD +CSP cyber datacenter Datadog deallocate +DEK Dockerfile Dynatrace -[Ee]mojivoto +Emojivoto etcd Filebeat Filestash Filestore +filesystem Fluentd +frontend Fulcio -Mbps Gbps GCP -gcp Grype -iam IAM -iodepth initramfs +iodepth +IPSec journald -[Kk]3s Kata +KEK +KMS kubeadm kubectl kubelet libcryptsetup Logstash +Mbps MicroK8s -[Mm]inikube namespace Nginx -[Pp]laintext +PCR +plaintext +proxied +QEMU Rekor resizable +resourceGroup rollout +SBOM sigstore -[Ss]uperset +SSD +superset Syft systemd +Terraform Tink -[Uu]nencrypted +TPM +unencrypted unspoofable updatable UUID -proxied -QEMU +vCPU virsh -[Ww]alkthrough +VM +walkthrough whitepaper WireGuard Xeon