Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public API spell check #23150

Merged
merged 12 commits into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,29 @@
"*.log",
"*.sln",
"*.user",
".vscode/cspell.json"
".vscode/cspell.json",

// These services are opted out of public API surface spell checking.
// Spelling issues must be addressed before adding these back in.
"sdk/agrifood/*/api/*.cs",
"sdk/communication/*/api/*.cs",
"sdk/compute/*/api/*.cs",
"sdk/containerregistry/*/api/*.cs",
"sdk/cosmosdb/*/api/*.cs",
"sdk/digitaltwins/*/api/*.cs",
"sdk/dns/*/api/*.cs",
"sdk/eventgrid/*/api/*.cs",
"sdk/insights/*/api/*.cs",
"sdk/machinelearningservices/*/api/*.cs",
"sdk/modelsrepository/*/api/*.cs",
"sdk/monitor/*/api/*.cs",
"sdk/network/*/api/*.cs",
"sdk/objectanchors/*/api/*.cs",
"sdk/purview/*/api/*.cs",
"sdk/remoterendering/*/api/*.cs",
"sdk/sqlmanagement/*/api/*.cs",
"sdk/synapse/*/api/*.cs",
"sdk/videoanalyzer/*/api/*.cs"
],
// cspell is not case sensitive
// Sort words alphabetically to make this list easier to use
Expand All @@ -38,6 +60,7 @@
"deserializable",
"deserializes",
"diagnoser",
"dont",
"dtmf",
"epsg",
"expando",
Expand All @@ -63,7 +86,10 @@
"unhold",
"uninstrumented",
"westus",
"xunit"
"xunit",
"vnet",
"unencrypted",
"personalizer"
],
"overrides": [
{
Expand Down
8 changes: 3 additions & 5 deletions eng/pipelines/aggregate-reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@ jobs:
- pwsh: |
npx cspell lint `
--config ./.vscode/cspell.json `
./sdk/**/api/*.cs
--no-must-find-files `
'sdk/*/*/api/*.cs'
displayName: Check spelling of public API surface
# Spelling errors in public api surface are not blockers yet but will
# Spelling errors in public api surface are not blockers yet but will
# become blockers when this is rolled out to all services. For now, turn
# the pipeline yellow if spelling errors are detected but do not block.
# Individual services can be blocked on spelling errors using:
# `SpellCheckPublicApiSurface: true`
# in the archetype-sdk-client.yml template invocation
continueOnError: true

- template: /eng/common/pipelines/templates/steps/verify-links.yml
Expand Down
5 changes: 1 addition & 4 deletions eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ parameters:
- name: MatrixReplace
type: object
default: []
- name: SpellCheckPublicApiSurface
type: boolean
default: false

jobs:
- job: Build
Expand Down Expand Up @@ -140,7 +137,7 @@ jobs:
arguments: >
-ServiceDirectory ${{ parameters.ServiceToTest }}
-SDKType ${{ parameters.SDKType }}
-SpellCheckPublicApiSurface:$${{ parameters.SpellCheckPublicApiSurface }}
-SpellCheckPublicApiSurface
pwsh: true
failOnStderr: false
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
Expand Down
4 changes: 0 additions & 4 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ parameters:
- name: MatrixReplace
type: object
default: []
- name: SpellCheckPublicApiSurface
type: boolean
default: false

variables:
- template: ../variables/globals.yml
Expand All @@ -74,7 +71,6 @@ stages:
ArtifactName: packages
TestSetupSteps: ${{ parameters.TestSetupSteps }}
TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }}
SpellCheckPublicApiSurface: ${{ parameters.SpellCheckPublicApiSurface }}
MatrixConfigs:
- ${{ each config in parameters.MatrixConfigs }}:
- ${{ config }}
Expand Down
1 change: 1 addition & 0 deletions eng/scripts/Export-API.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if ($SpellCheckPublicApiSurface) {
Write-Host "Spell check public API surface"
npx cspell lint `
--config "$PSScriptRoot/../../.vscode/cspell.json" `
--no-must-find-files `
"$PSScriptRoot/../../sdk/$ServiceDirectory/*/api/*.cs"
if ($LASTEXITCODE) {
Write-Host "##vso[task.LogIssue type=error;]Spelling errors detected. To correct false positives or learn about spell checking see: https://aka.ms/azsdk/engsys/spellcheck"
Expand Down
1 change: 0 additions & 1 deletion sdk/formrecognizer/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: formrecognizer
SpellCheckPublicApiSurface: true
ArtifactName: packages
Artifacts:
- name: Azure.AI.FormRecognizer
Expand Down
1 change: 0 additions & 1 deletion sdk/storage/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: storage
SpellCheckPublicApiSurface: true
ArtifactName: packages
Artifacts:
- name: Azure.Storage.Blobs
Expand Down
1 change: 0 additions & 1 deletion sdk/textanalytics/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: textanalytics
danieljurek marked this conversation as resolved.
Show resolved Hide resolved
SpellCheckPublicApiSurface: true
ArtifactName: packages
Artifacts:
- name: Azure.AI.TextAnalytics
Expand Down
1 change: 0 additions & 1 deletion sdk/translation/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ extends:
parameters:
ServiceDirectory: translation
ArtifactName: packages
SpellCheckPublicApiSurface: true
Artifacts:
- name: Azure.AI.Translation.Document
safeName: AzureAITranslationDocument