Skip to content

Commit

Permalink
Merge pull request #3568 from danieljurek/djurek/cspell-baseline-trb
Browse files Browse the repository at this point in the history
Port changes going into Azure repo
  • Loading branch information
danieljurek authored Dec 10, 2024
2 parents 53ed590 + b36000c commit 3fa195c
Show file tree
Hide file tree
Showing 282 changed files with 10,338 additions and 5,836 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/spelling-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check Spelling - All

on:
push:
branches:
- main
- RPSaaSMaster
- typespec-next

schedule:
# Run every day at 12:06 UTC
- cron: '6 12 * * *'
workflow_dispatch:

jobs:
check-spelling:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Run spelling check
run: |
./eng/common/spelling/Invoke-Cspell.ps1 `
-ScanGlobs 'specifications/**' `
-CSpellConfigPath './cspell.json'
shell: pwsh
34 changes: 34 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check Spelling

on:
pull_request:
branches:
- main
- RPSaaSMaster
- typespec-next

jobs:
check-spelling:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# Fetch the entire history of the repository. Attempting to check out
# the merge commit and the base branch does not save any time.
fetch-depth: 0

- name: Run spelling check
run: |
$targetCommittish = git rev-parse origin/${{ github.base_ref }}
./eng/common/scripts/check-spelling-in-changed-files.ps1 `
-CSpellConfigPath 'cspell.json' `
-SourceCommittish '${{ github.sha }}' `
-TargetCommittish $targetCommittish `
-ExitWithError
if ($LASTEXITCODE) {
Write-Host "Spelling errors found in changed files. See https://aka.ms/ci-fix#spell-check"
exit $LASTEXITCODE
}
shell: pwsh
Loading

0 comments on commit 3fa195c

Please sign in to comment.