...

Text file src/github.com/Azure/azure-sdk-for-go/eng/common/pipelines/templates/steps/check-spelling.yml

Documentation: github.com/Azure/azure-sdk-for-go/eng/common/pipelines/templates/steps

     1# Checks spelling of files that changed between the current state of the repo
     2# and some ref (branch, tag, etc.) or commit hash. Only runs on PRs.
     3# ContinueOnError   - true: Pipeline warns on spelling error
     4#                     false: Pipeline fails on spelling error
     5# TargetBranch      - Target ref (e.g. main) to compare to create file change
     6#                     list.
     7# CspellConfigPath  - Path to cspell.json config location
     8#
     9# This check recognizes the setting of variable "Skip.SpellCheck"
    10# if set to 'true', spellchecking will not be invoked.
    11
    12parameters:
    13  ContinueOnError: true
    14  CspellConfigPath: ./.vscode/cspell.json
    15
    16steps:
    17  - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
    18    - task: NodeTool@0
    19      condition: and(succeededOrFailed(), ne(variables['Skip.SpellCheck'],'true'))
    20      inputs:
    21        versionSpec: 16.x
    22      displayName: Use Node.js 16.x
    23
    24    - task: PowerShell@2
    25      displayName: Check spelling (cspell)
    26      condition: and(succeededOrFailed(), ne(variables['Skip.SpellCheck'],'true'))
    27      continueOnError: ${{ parameters.ContinueOnError }}
    28      inputs:
    29        targetType: filePath
    30        filePath: eng/common/scripts/check-spelling-in-changed-files.ps1
    31        arguments: >-
    32          -CspellConfigPath ${{ parameters.CspellConfigPath }}
    33          -ExitWithError:(!$${{ parameters.ContinueOnError }})
    34        pwsh: true

View as plain text