From 7065cac70b5ab128314aa9c7e2ec84b5a5b3b660 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar <110245118+ankatiyar@users.noreply.github.com> Date: Tue, 22 Aug 2023 16:58:01 +0100 Subject: [PATCH] Setup Vale linter as a GHA workflow (#2953) * Add vale GHA Signed-off-by: Ankita Katiyar * Update condition Signed-off-by: Ankita Katiyar * Update .github/styles/Kedro/ignore.txt Co-authored-by: Jo Stichbury * add some styles Signed-off-by: Jo Stichbury * Remove styles for now Signed-off-by: Ankita Katiyar --------- Signed-off-by: Ankita Katiyar Signed-off-by: Jo Stichbury Co-authored-by: Jo Stichbury --- .github/styles/Kedro/Spellings.yml | 6 ++ .github/styles/Kedro/ignore-names.txt | 111 +++++++++++++++++++++ .github/styles/Kedro/ignore.txt | 31 ++++++ .github/workflows/docs-language-linter.yml | 16 +++ .github/workflows/docs-only-checks.yml | 2 +- .vale.ini | 7 ++ 6 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 .github/styles/Kedro/Spellings.yml create mode 100644 .github/styles/Kedro/ignore-names.txt create mode 100644 .github/styles/Kedro/ignore.txt create mode 100644 .github/workflows/docs-language-linter.yml create mode 100644 .vale.ini diff --git a/.github/styles/Kedro/Spellings.yml b/.github/styles/Kedro/Spellings.yml new file mode 100644 index 0000000000..00a486ff0d --- /dev/null +++ b/.github/styles/Kedro/Spellings.yml @@ -0,0 +1,6 @@ +extends: spelling +message: "Did you really mean '%s'?" +level: warning +ignore: + - Kedro/ignore.txt + - Kedro/ignore-names.txt diff --git a/.github/styles/Kedro/ignore-names.txt b/.github/styles/Kedro/ignore-names.txt new file mode 100644 index 0000000000..6ab1616c02 --- /dev/null +++ b/.github/styles/Kedro/ignore-names.txt @@ -0,0 +1,111 @@ +Ahdra +Aris +Alves +Alam +Andrew +Andrii +Anton +Antony +Ankita +Batori +Braccialli +Brummitt +Cano +Carvalho +Cvetanka +Czakon +Chan +Comym +Couto +Daiha +Dada +Danov +Datta +DeBold +Deepyaman +Deriabin +Diaz +Dmitrii +Dmitry +Emamjome +Erins +Gabriel +Gundaniya +Guilherme +Hamza +Hoang +Holzer +Huong +Helmhold +Ignacio +Ivaniuk +Ivan +Jakub +Jannic +Jankowski +Jitendra +Jiri +Jo +Joel +Juan +Kadiri +Kaiser +Kaltsas +Kanchwala +Katiyar +Khan +Kirilenko +Kiyohito +Klein +Kunii +Kumar +Lais +Laura +Liam +Lim +Lorena +Machado +Mackay +Malte +Malloy +Marcin +Meisam +Merali +Merel +Milne +Nasef +Nechevska +Nero +Nguyen +Nikolaos +Nikolic +Nok +Okwa +Oza +Paricio +Patel +Peteris +Pilla +Rashida +Ravi +Richard +Schwarzmann +Sorokin +Stichbury +Susanna +Sajid +Stephanie +Takieddine +Theisen +Tynan +Tsaousis +Valtazanos +Vladimir +Waylon +Westenra +Wong +Wrigley +Yolan +Yetunde +Zablocki +Zain diff --git a/.github/styles/Kedro/ignore.txt b/.github/styles/Kedro/ignore.txt new file mode 100644 index 0000000000..6ede60d83b --- /dev/null +++ b/.github/styles/Kedro/ignore.txt @@ -0,0 +1,31 @@ +Kedro +Kedro's +Kubeflow +Databricks +Conda +conda +Cookiecutter +config +fsspec +Kaggle +namespace +namespaces +namespaced +regressors +repo +Repo +dbx +MLflow +csv +yaml +matplotlib +Matplotlib +IPython +APIs +networkx +Plotly +Pylint +SQLAlchemy +Astro +Xebia +pytest diff --git a/.github/workflows/docs-language-linter.yml b/.github/workflows/docs-language-linter.yml new file mode 100644 index 0000000000..02b60b7324 --- /dev/null +++ b/.github/workflows/docs-language-linter.yml @@ -0,0 +1,16 @@ +name: Language Linter for Kedro Docs +on: + pull_request: + paths: + - "docs/**" + - '**.md' + +jobs: + vale: + name: runner / vale + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: errata-ai/vale-action@reviewdog + with: + reporter: github-pr-review diff --git a/.github/workflows/docs-only-checks.yml b/.github/workflows/docs-only-checks.yml index b7940e85be..d13a76c589 100644 --- a/.github/workflows/docs-only-checks.yml +++ b/.github/workflows/docs-only-checks.yml @@ -17,7 +17,7 @@ on: - '**.md' jobs: - lint-tests: + lint: strategy: matrix: os: [ ubuntu-latest ] diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000000..7d486713e7 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,7 @@ +StylesPath = .github/styles + +MinAlertLevel = suggestion + +[*.md] +BasedOnStyles = Vale, Kedro +Vale.Spelling = NO