From 853a100e90cccd789216594858128aa3864a26de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Harper?= Date: Wed, 15 Nov 2023 17:25:08 -0500 Subject: [PATCH] ci: add a workflow to validate syntax --- .github/workflows/check-syntax.yml | 26 ++++++++ .vale.ini | 13 ++++ README.md | 4 +- styles/.DS_Store | Bin 0 -> 6148 bytes styles/Custom/ignore.txt | 79 ++++++++++++++++++++++++ styles/Custom/spelling.yml | 6 ++ styles/Custom/substitutions.yml | 56 +++++++++++++++++ styles/Vocab/.DS_Store | Bin 0 -> 6148 bytes styles/Vocab/base/accept.txt | 95 +++++++++++++++++++++++++++++ 9 files changed, 277 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/check-syntax.yml create mode 100644 .vale.ini create mode 100644 styles/.DS_Store create mode 100644 styles/Custom/ignore.txt create mode 100644 styles/Custom/spelling.yml create mode 100644 styles/Custom/substitutions.yml create mode 100644 styles/Vocab/.DS_Store create mode 100644 styles/Vocab/base/accept.txt diff --git a/.github/workflows/check-syntax.yml b/.github/workflows/check-syntax.yml new file mode 100644 index 0000000..b2185b9 --- /dev/null +++ b/.github/workflows/check-syntax.yml @@ -0,0 +1,26 @@ +--- +name: Syntax Validation +on: [push, workflow_dispatch] + +jobs: + syntax-check: + name: vale + runs-on: ubuntu-latest + steps: + - name: Checkout this repository + uses: actions/checkout@v3.5.3 + + - name: Get latest version of Vale + id: lastversion + uses: dvershinin/lastversion-action@v0.0.3 + with: + repository: errata-ai/vale + + - name: Install Vale + run: | + wget https://github.com/errata-ai/vale/releases/download/v${{ steps.lastversion.outputs.last_version }}/vale_${{ steps.lastversion.outputs.last_version }}_Linux_64-bit.tar.gz -O vale.tar.gz + tar -xvzf vale.tar.gz vale + rm vale.tar.gz + + - name: Validate the syntax + run: ./vale --config=.vale.ini *.md diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000..a3f608f --- /dev/null +++ b/.vale.ini @@ -0,0 +1,13 @@ +StylesPath = styles +Vocab = base + +[formats] +mdx = md + +[*.md] +BasedOnStyles = Custom +Packages = alex +IgnoredScopes = code +BlockIgnores = (?s) *(import.*?\n), \ + (?s) *(### gitops\n) +TokenIgnores = (?s) *(export.*?\n) diff --git a/README.md b/README.md index 3492621..97acd11 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ To make a new application available for installation, you'll need to: - **website**: application website or GitHub repository. - **imageUrl**: full web URL for the application's logo. It will be displayed in the GitOps catalog. _For now, it needs to be located on a third-party server, but we'll update this field to grab them from the GitHub repository soon, so it doesn't depend on external URL._ - **description**: an insightful description about your application. It will be displayed in the GitOps Catalog (200 characters maximum). - - **categories**: one category amongts the following ones: + - **categories**: one category amongst the following ones: - App management - Architecture - CI/CD @@ -33,7 +33,7 @@ To make a new application available for installation, you'll need to: - Storage - Testing - Create a new directory with your new application's name in your fork. - - Add, and organize your Argo CD gitops file(s) into it, if any. + - Add, and organize your Argo CD GitOps file(s) into it, if any. - Create a pull request with the changes from your branch to our main branch. ### Acceptance Criteria diff --git a/styles/.DS_Store b/styles/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6c176e53b999a73eaa668937379b41b19d6012ea GIT binary patch literal 6148 zcmeHK%}T>S5Z>*NZ7D(yiXIod7HoyO|HNKa4T%E<&3zi!s)QhR9K=5Hwf1Y9<(wt2u%oPiH|agNkYX zrU}2j$;M2w2j;W&@Bav9ag=8L{wJ^18_k^-NVj$8J;~h5{A`iB{`>|o^g$gC zR;x~X|LFMaa`GI%B=Sx3$boPry9P^m2W73GS8txgGI<1RnNda(5(C5lF+dD#DFfy} zXm_`?ekz+7AO?PB0QUz04bd@JXjEGVba;J6e*+N(bbL!73WJWpLL+!UxK0JssoXp< zxK0PVFmaB-LZeP+T&)cAn3c=N3s*`-KtSKP1i%3IkwfLwet|l~IR*=jI1AcU QIv`yH6d}|R1HZt)7rtalL;wH) literal 0 HcmV?d00001 diff --git a/styles/Custom/ignore.txt b/styles/Custom/ignore.txt new file mode 100644 index 0000000..2a9b688 --- /dev/null +++ b/styles/Custom/ignore.txt @@ -0,0 +1,79 @@ +# A +argo +argocd +atlantis +aws + +# B + +# C +chartmuseum +civo +cli +config +cronjob + +# D +displayName + +# E +ecr +eks + +# F + +# G +gcp +github +gitlab +gitops + +# H +https + +# I +iam +imageUrl + +# J + +# K +kubeconfig +kubefirst +kubernetes + +# L + +# M + +# N + +# O +oidc + +# P + +# Q + +# R +repo + +# S + +# T +terraform + +# U +ui +url + +# V +vpc + +# W + +# X + +# Y + +# Z diff --git a/styles/Custom/spelling.yml b/styles/Custom/spelling.yml new file mode 100644 index 0000000..8bbf5ab --- /dev/null +++ b/styles/Custom/spelling.yml @@ -0,0 +1,6 @@ +--- +extends: spelling +message: "Did you really mean '%s'?" +level: error +ignore: + - styles/Custom/ignore.txt diff --git a/styles/Custom/substitutions.yml b/styles/Custom/substitutions.yml new file mode 100644 index 0000000..12c75fa --- /dev/null +++ b/styles/Custom/substitutions.yml @@ -0,0 +1,56 @@ +--- +extends: substitution +message: Consider using '%s' instead of '%s' +ignorecase: false +level: error +swap: + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + '(?<=^| )argo [C|c][D|d](?=$| |\.)': Argo CD + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + '(?<=^| )Argo [C|c][D|d](?=$| |\.)': Argo CD + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + '(?<=^| )[A|a]rgo[C|c][D|d](?=$| |\.)': Argo CD + 'argo [W|w]orkflows?': Argo Workflows + 'Argo [W|w]orkflows?': Argo Workflows + atlantis: Atlantis + chartmuseum: ChartMuseum + cli: CLI + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + '(?<=^| )civo(?=$| |\.)': Civo + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + '(?<=^| )CIVO(?=$| |\.)': Civo + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + '(?<=^| )configs?(?=$| |\.)': configurations + cronjob: CronJob + ecr: ECR + eks: EKS + 'digital[o|O]cean': DigitalOcean + '[d|D]igitalocean': DigitalOcean + docker: Docker + gcp: Google Cloud + gcp cloud: Google Cloud + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + '[G|g]ithub': GitHub + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + 'git[H|h]ub': GitHub + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + '(?<=^| )[G|g]itlab(?=$| |\.)': GitLab + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + '(?<=^| )git[L|l]ab(?=$| |\.)': GitLab + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + '(?<=^| )gitops(?=$| |\.)': GitOps for the term or put gitops as inline code for the repository + google: Google + helm: Helm + https: HTTPS + iam: IAM + kubernetes: Kubernetes + mongo: MongoDB + oidc: OIDC + repo: repository + SSH: SSH + # Starting or with a space before, and ending with a dot or space (so not working used in a path, caused of MDX) + '(?<=^| )terraform(?=$| |\.)': Terraform + ui: UI + url: URL + vpc: VPC + vultr: Vultr diff --git a/styles/Vocab/.DS_Store b/styles/Vocab/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..935f3419aaf37a042da9f32ed5267d7502215c5f GIT binary patch literal 6148 zcmeHK%}T>S5Z-NTe<(r@iXIod7Ho}Ed5{xHV4n};@I7Gtan4Uwa=LD0O>)iA+`T+JcbJSfsd5X)f0 zM1RqQ-`-}AEN3apSpEAyf<+vq*>L#D8_m{Ey93hi++T;NpIuI0;&~$9G>;r8SF&rcf_G4ACB1sfB$mk&*sGi>mXH`A28aP-U<(;A zhe5Z$g|$=3!~ikyGXuCk2xy3o!BV5zI-tYrGx}SID4^q80#O)r43-+f1HyGGpibrH ziNSR`*oBF643-*oI^$|(n8&PKJzlt49qdAdGwx`lo){no>I^jX(8BZo0)Cl|kNkQH zjfeqa;GZ$TTN7{MLQ&>y{Z<~HwF24$G!%?0Q2_zHb_sw1?jwiFsr>?Vh;s~<8gUl1 Rt8_rR2q;3RBL;qffiI-xOdtRN literal 0 HcmV?d00001 diff --git a/styles/Vocab/base/accept.txt b/styles/Vocab/base/accept.txt new file mode 100644 index 0000000..c1ec0d4 --- /dev/null +++ b/styles/Vocab/base/accept.txt @@ -0,0 +1,95 @@ +# A +admunition +anonymize +auditable +automation + +# B + +# C +CLI' +ClusterIssuer +containerd +CPU +CWFT + +# D +Datadog +deprovision +Dietz +Dockerfile +Docusaurus + +# E + +# F + +# G + +# H +hotfix + +# I +interoperate + +# J + +# K +kbot +KMS +kubectl +Kubeshop + +# L + +# M +markdownlint +mkcert +multinode + +# N +namespace +nerdctl +npm +ngrok +Nginx + +# O +onboarding + +# P +preconfigure + +# Q + +# R +Reloader +routable + +# S +statestore +subnet + +# T +teardown +todo +toolset +Traefik +truststore +Typesense + +# U +uncomment + +# V +vale +Vultr + +# W +walkthrough + +# X + +# Y + +# Z