Skip to content

Commit

Permalink
cspell issues in cpp branch , needs updated node, and cspell and npx …
Browse files Browse the repository at this point in the history
…need to be installed for cspell to run (Azure#32255)

Co-authored-by: George Arama <50641385+gearama@users.noreply.github.com>
  • Loading branch information
azure-sdk and gearama authored Nov 2, 2022
1 parent 567a36d commit 5d0988c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions eng/common/pipelines/templates/steps/check-spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ steps:
- task: NodeTool@0
condition: and(succeededOrFailed(), ne(variables['Skip.SpellCheck'],'true'))
inputs:
versionSpec: 16.x
displayName: Use Node.js 16.x
versionSpec: 18.x
displayName: Use Node.js 18.x

- task: PowerShell@2
displayName: Check spelling (cspell)
Expand Down
4 changes: 3 additions & 1 deletion eng/common/spelling/Invoke-Cspell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,12 @@ $originalLocation = Get-Location

try {
Set-Location $PackageInstallCache
npm install npx | Out-Null
npm install cspell | Out-Null
npm install | Out-Null

# Use the mutated configuration file when calling cspell
$command = "npx --no-install cspell $JobType --config $CSpellConfigPath --no-must-find-files --root $SpellCheckRoot --relative"
$command = "npx cspell $JobType --config $CSpellConfigPath --no-must-find-files --root $SpellCheckRoot --relative"
Write-Host $command
$cspellOutput = npx `
--no-install `
Expand Down

0 comments on commit 5d0988c

Please sign in to comment.