From 67229ce2b3a955e8098b68010e11a27729fd5d99 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 17 Jun 2024 11:11:21 +0100 Subject: [PATCH] add --- .github/workflows/vale.yml | 5 +++-- styles/custom/SentenceCaseHeaders.yml | 7 +++++-- styles/custom/Spelling.yml | 11 ----------- styles/custom/Typos.yml | 14 +++++++++++++- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index b1baf5b595d..f72261edcc0 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -21,6 +21,8 @@ jobs: - name: Install Vale uses: errata-ai/vale-action@v2 + with: + version: latest - name: Get changed files id: changed-files @@ -37,8 +39,7 @@ jobs: run: | for file in ${{ env.CHANGED_FILES }}; do echo "Running Vale on $file" - vale --output=JSON $file > "vale_output_${file//\//_}.json" - vale --output=edit $file > "vale_output_${file//\//_}_edit.md" + vale --output=line "$file" done echo "Vale outputs:" ls -l diff --git a/styles/custom/SentenceCaseHeaders.yml b/styles/custom/SentenceCaseHeaders.yml index d565bee6a0a..44a3acbe9e1 100644 --- a/styles/custom/SentenceCaseHeaders.yml +++ b/styles/custom/SentenceCaseHeaders.yml @@ -2,7 +2,10 @@ extends: existence message: "Header '%s' should be in sentence case: 'Sentence case header'." level: warning -scope: heading -ignorecase: false +scope: + - heading.h1 + - heading.h2 + - heading.h3 + - heading.h4 tokens: | ^[#]{1,4}\s+[a-z][^\n]*$ diff --git a/styles/custom/Spelling.yml b/styles/custom/Spelling.yml index 2cf033f7ea6..edafa517926 100644 --- a/styles/custom/Spelling.yml +++ b/styles/custom/Spelling.yml @@ -2,17 +2,6 @@ extends: spelling message: "Detected non-American spelling. Consider using American spelling: '%s' instead of '%s." level: warning -ignore: - - dbt - - dbt Cloud - - ETL - - ELT - - DAG - - CTE - - DDL - - DML - - JSON - - CI/CD path: styles/custom/your-dictionary.dic diff --git a/styles/custom/Typos.yml b/styles/custom/Typos.yml index be02d360dcc..40a091e3e56 100644 --- a/styles/custom/Typos.yml +++ b/styles/custom/Typos.yml @@ -1,6 +1,6 @@ extends: substitution -message: "Possible typo detected: Consider using '%s' instead of '%s'" +message: "Oops there's a typo! Consider changing '{{.Match}}' to '{{.Suggestions}}.'" level: warning swap: - teh: the @@ -10,5 +10,17 @@ swap: - occured: occurred - untill: until +ignore: + - dbt + - dbt Cloud + - ETL + - ELT + - DAG + - CTE + - DDL + - DML + - JSON + - CI/CD + action: name: replace