-
Notifications
You must be signed in to change notification settings - Fork 977
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'current' into mwong-add-preview-link
- Loading branch information
Showing
11 changed files
with
298 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Vale linting | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
paths: | ||
- 'website/docs/**/*' | ||
- 'website/blog/**/*' | ||
- 'website/**/*' | ||
|
||
jobs: | ||
vale: | ||
name: Vale linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: List repository contents | ||
run: | | ||
pwd | ||
ls -R | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install Vale | ||
run: pip install vale==2.27.0 # Install a stable version of Vale | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v34 | ||
with: | ||
files: | | ||
website/**/*.md | ||
separator: ' ' | ||
|
||
- name: Debugging - Print changed files | ||
if: ${{ steps.changed-files.outputs.any_changed == 'true' }} | ||
run: | | ||
echo "Changed files:" | ||
echo "${{ steps.changed-files.outputs.all_changed_and_modified_files }}" | ||
- name: Confirm files exist | ||
if: ${{ steps.changed-files.outputs.any_changed == 'true' }} | ||
run: | | ||
echo "Checking if files exist..." | ||
for file in ${{ steps.changed-files.outputs.all_changed_and_modified_files }}; do | ||
if [ -f "$file" ]; then | ||
echo "Found: $file" | ||
else | ||
echo "File not found: $file" | ||
exit 1 | ||
fi | ||
done | ||
- name: Run vale | ||
if: ${{ steps.changed-files.outputs.any_changed == 'true' }} | ||
uses: errata-ai/vale-action@reviewdog | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: github-check | ||
files: ${{ steps.changed-files.outputs.all_changed_and_modified_files }} | ||
separator: ' ' | ||
version: '2.27.0' | ||
|
||
- name: Post summary comment | ||
if: ${{ steps.changed-files.outputs.any_changed == 'true' }} | ||
run: | | ||
COMMENT="❗️Oh no, some Vale linting found issues! Please check the **Files change** tab for detailed results and make the necessary updates." | ||
COMMENT+=$'\n' | ||
COMMENT+=$'\n\n' | ||
COMMENT+="➡️ Link to detailed report: [Files changed](${{ github.event.pull_request.html_url }}/files)" | ||
gh pr comment ${{ github.event.pull_request.number }} --body "$COMMENT" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
content_dir: /docs | ||
authorized_users: | ||
- mirnawong1 | ||
- matthewshaver | ||
- nghi-ly | ||
- runleonarun | ||
- nataliefiann | ||
|
||
vale: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
StylesPath = styles | ||
MinAlertLevel = warning | ||
|
||
Vocab = EN | ||
|
||
[*.md] | ||
BasedOnStyles = custom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
dbt Cloud | ||
dbt Core | ||
dbt Semantic Layer | ||
dbt Explorer | ||
dbt | ||
dbt-tonic | ||
dbtonic | ||
IDE | ||
CLI | ||
Config | ||
info | ||
docs | ||
yaml | ||
YAML | ||
SQL | ||
bash | ||
shell | ||
MetricFlow | ||
jinja | ||
jinja2 | ||
sqlmesh | ||
Snowflake | ||
Databricks | ||
Fabric | ||
Redshift | ||
Azure | ||
DevOps | ||
Athena | ||
Amazon | ||
UI | ||
CSV | ||
S3 | ||
SCD | ||
repo | ||
dbt_project.yml | ||
boolean | ||
defaultValue= | ||
DWH | ||
DWUs | ||
shoutout | ||
ADF | ||
BQ | ||
gcloud | ||
MSFT | ||
DDL | ||
APIs | ||
API | ||
SSIS | ||
PBI | ||
PowerBI | ||
datetime | ||
PySpark | ||
:::caution | ||
:::note | ||
:::info | ||
:::tip | ||
:::warning | ||
\<[^>]+\> | ||
\b[A-Z]{2,}(?:/[A-Z]{2,})?\b | ||
\w+-\w+ | ||
\w+/\w+ | ||
n/a | ||
N/A | ||
\<Tabs | ||
pseudocolumn | ||
yml | ||
values= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
DBT Cloud | ||
DBT Core | ||
DBT Semantic Layer | ||
DBT Explorer | ||
DBT | ||
DBT-tonic | ||
DBTonic | ||
DBT Mesh | ||
\b\w+\s{2,}\w+\b <!-- catches extra spaces --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
extends: substitution | ||
message: "Avoid latin abbreviations: '%s'. Consider using '%s' instead." | ||
level: warning | ||
ignorecase: false | ||
|
||
swap: | ||
- e.g.: for example | ||
- eg: for example | ||
- e.g: for example | ||
- i.e.: for example | ||
- i.e.: that is | ||
- etc.: and so on | ||
- N.B.: Note | ||
|
||
action: | ||
name: replace | ||
params: | ||
- for example | ||
- that is | ||
- and so on | ||
- Note |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extends: metric | ||
message: "Try to keep the Flesch-Kincaid grade level (%s) below 8." | ||
link: https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests | ||
|
||
formula: | | ||
(0.39 * (words / sentences)) + (11.8 * (syllables / words)) - 15.59 | ||
condition: "> 8.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
extends: repetition | ||
message: "'%s' is repeated!" | ||
level: warning | ||
alpha: true | ||
tokens: | ||
- '[^\s]+' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
extends: capitalization | ||
message: "'%s' should use sentence-style capitalization. Try '%s' instead." | ||
level: warning | ||
scope: heading | ||
match: $sentence # Enforces sentence-style capitalization | ||
indicators: | ||
- ":" | ||
exceptions: | ||
- '\bdbt\b' | ||
- '\bdbt\s+Cloud\b' | ||
- '\bdbt\s+Core\b' | ||
- '\bdbt\s+Cloud\s+CLI\b' | ||
- Snowflake | ||
- Databricks | ||
- Azure | ||
- GCP | ||
- AWS | ||
- SQL | ||
- CLI | ||
- API | ||
- YAML | ||
- JSON | ||
- HTML | ||
- Redshift | ||
- BigQuery | ||
- SnowSQL | ||
- Snowsight | ||
- Snowpark | ||
- Fabric | ||
- Microsoft | ||
- Postgres | ||
- Explorer | ||
- IDE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
extends: spelling | ||
|
||
message: "Oops there's a typo -- did you really mean '%s'? " | ||
level: warning | ||
|
||
action: | ||
name: suggest | ||
params: | ||
- spellings | ||
|
||
custom: true | ||
filters: | ||
- '\bdbt\b' | ||
- '\bdbt\s+Cloud\b' | ||
- '\bdbt\s+Core\b' | ||
- '\bdbt\s+Cloud\s+CLI\b' | ||
- '\bdbt\s+.*?\b' | ||
- '<[^>]+>' # Ignore all HTML-like components starting with < and ending with > | ||
- '<[^>]+>.*<\/[^>]+>' | ||
|
||
--- | ||
|
||
extends: existence | ||
|
||
message: "Ignore specific patterns" | ||
level: skip | ||
tokens: | ||
- '\bdbt\b' | ||
- '\bdbt\s+Cloud\b' | ||
- '\bdbt\s+Core\b' | ||
- '\bdbt\s+Cloud\s+CLI\b' | ||
- '\bdbt\s+.*?\b' | ||
- '<[^>]+>' # Ignore all HTML-like components starting with < and ending with > | ||
- '<[^>]+>.*<\/[^>]+>' | ||
- '\w+-\w+' | ||
- '\w+/\w+' | ||
- '\w+/\w+|\w+-\w+|n/a' | ||
- 'n/a' | ||
- 'N/A' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# styles/custom/BoldUIElements.yml | ||
extends: existence | ||
message: "UI elements like '%s' should be bold." | ||
level: warning | ||
tokens: | ||
# Match UI elements that are not bolded (i.e., not within **), but exclude those starting a sentence or following a list number | ||
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bSave\b' | ||
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bSave as\b' | ||
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bCancel\b' | ||
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bSubmit\b' | ||
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bEdit\b' | ||
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bAccount settings\b' | ||
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bProject details\b' | ||
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bProfile settings\b' | ||
- '(?<!^)(?<![.!?]\s)(?<!\d\.\s)\bPersonal profile\b' | ||
|
||
scope: raw # Ensure the rule is applied before formatting |