From b70c8ee88f2b33cc1dd3fa9fe875a5b0f501d0b7 Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Fri, 5 Jun 2020 15:09:02 -0700 Subject: [PATCH 1/7] Add sample link validation --- eng/scripts/CodeChecks.ps1 | 5 +++++ eng/scripts/Validate-Sample-Readmes.ps1 | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 eng/scripts/Validate-Sample-Readmes.ps1 diff --git a/eng/scripts/CodeChecks.ps1 b/eng/scripts/CodeChecks.ps1 index 59eb978d89b1f..4c7a3fed5300b 100644 --- a/eng/scripts/CodeChecks.ps1 +++ b/eng/scripts/CodeChecks.ps1 @@ -62,6 +62,11 @@ try { } } + Write-Host "Validating sample readmes" + Invoke-Block { + & $PSScriptRoot\Validate-Sample-readmes.ps1 @script:PSBoundParameters + } + Write-Host "Re-generating readmes" Invoke-Block { & $PSScriptRoot\Update-Snippets.ps1 @script:PSBoundParameters diff --git a/eng/scripts/Validate-Sample-Readmes.ps1 b/eng/scripts/Validate-Sample-Readmes.ps1 new file mode 100644 index 0000000000000..b4c121b849d4f --- /dev/null +++ b/eng/scripts/Validate-Sample-Readmes.ps1 @@ -0,0 +1,25 @@ +[CmdletBinding()] +param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] $ServiceDirectory +) + +$root = "$PSScriptRoot/../../sdk/$ServiceDirectory" + +foreach ($projectDirName in Get-ChildItem -Directory $root -Filter "Azure.*") +{ + $sampleReadmePath = $root + '/' + $projectDirName + '/samples/README.md'; + if (Test-Path $sampleReadmePath) { + $content = Get-Content -Path $sampleReadmePath + $matches = $content | Select-String -Pattern ".md\)" + foreach ($match in $matches) + { + $relLink = $match | Select-String -NotMatch "\(http" + if ($relLink) + { + LogError "Absolute links to GitHub should be used in the samples readme file: $sampleReadmePath, link: $relLink" + } + } + } +} From 9019e4fa86959298f8a7da2dd7dd11b4ca48cc1d Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Fri, 5 Jun 2020 15:37:15 -0700 Subject: [PATCH 2/7] Support asterisk passed in --- eng/scripts/Validate-Sample-Readmes.ps1 | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/eng/scripts/Validate-Sample-Readmes.ps1 b/eng/scripts/Validate-Sample-Readmes.ps1 index b4c121b849d4f..15aa336ce8a05 100644 --- a/eng/scripts/Validate-Sample-Readmes.ps1 +++ b/eng/scripts/Validate-Sample-Readmes.ps1 @@ -7,17 +7,14 @@ param ( $root = "$PSScriptRoot/../../sdk/$ServiceDirectory" -foreach ($projectDirName in Get-ChildItem -Directory $root -Filter "Azure.*") -{ +foreach ($projectDirName in Get-ChildItem -Recurse -Directory $root -Filter "Azure.*"){ $sampleReadmePath = $root + '/' + $projectDirName + '/samples/README.md'; if (Test-Path $sampleReadmePath) { $content = Get-Content -Path $sampleReadmePath - $matches = $content | Select-String -Pattern ".md\)" - foreach ($match in $matches) - { + $matches = $content | Select-String -Pattern "(.md|.cs)\)" + foreach ($match in $matches){ $relLink = $match | Select-String -NotMatch "\(http" - if ($relLink) - { + if ($relLink){ LogError "Absolute links to GitHub should be used in the samples readme file: $sampleReadmePath, link: $relLink" } } From ee93c120acf083cac7633b71d18e749d393add28 Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Fri, 5 Jun 2020 16:19:34 -0700 Subject: [PATCH 3/7] move inline --- eng/scripts/CodeChecks.ps1 | 15 +++++++++++++-- eng/scripts/Validate-Sample-Readmes.ps1 | 22 ---------------------- 2 files changed, 13 insertions(+), 24 deletions(-) delete mode 100644 eng/scripts/Validate-Sample-Readmes.ps1 diff --git a/eng/scripts/CodeChecks.ps1 b/eng/scripts/CodeChecks.ps1 index 4c7a3fed5300b..8cc54bdedf600 100644 --- a/eng/scripts/CodeChecks.ps1 +++ b/eng/scripts/CodeChecks.ps1 @@ -63,8 +63,19 @@ try { } Write-Host "Validating sample readmes" - Invoke-Block { - & $PSScriptRoot\Validate-Sample-readmes.ps1 @script:PSBoundParameters + $root = "$PSScriptRoot/../../sdk/$ServiceDirectory" + foreach ($projectDirName in Get-ChildItem -Recurse -Directory $root -Filter "Azure.*"){ + $sampleReadmePath = $root + '/' + $projectDirName + '/samples/README.md'; + if (Test-Path $sampleReadmePath) { + $content = Get-Content -Path $sampleReadmePath + $matches = $content | Select-String -Pattern "(.md|.cs)\)" + foreach ($match in $matches){ + $relLink = $match | Select-String -NotMatch "\(http" + if ($relLink){ + LogError "Absolute links to GitHub should be used in the samples readme file: $sampleReadmePath, link: $relLink" + } + } + } } Write-Host "Re-generating readmes" diff --git a/eng/scripts/Validate-Sample-Readmes.ps1 b/eng/scripts/Validate-Sample-Readmes.ps1 deleted file mode 100644 index 15aa336ce8a05..0000000000000 --- a/eng/scripts/Validate-Sample-Readmes.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -[CmdletBinding()] -param ( - [Parameter(Position=0)] - [ValidateNotNullOrEmpty()] - [string] $ServiceDirectory -) - -$root = "$PSScriptRoot/../../sdk/$ServiceDirectory" - -foreach ($projectDirName in Get-ChildItem -Recurse -Directory $root -Filter "Azure.*"){ - $sampleReadmePath = $root + '/' + $projectDirName + '/samples/README.md'; - if (Test-Path $sampleReadmePath) { - $content = Get-Content -Path $sampleReadmePath - $matches = $content | Select-String -Pattern "(.md|.cs)\)" - foreach ($match in $matches){ - $relLink = $match | Select-String -NotMatch "\(http" - if ($relLink){ - LogError "Absolute links to GitHub should be used in the samples readme file: $sampleReadmePath, link: $relLink" - } - } - } -} From 7942c7a6bc97f87c36090d3765e899f153678ec2 Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Fri, 5 Jun 2020 18:06:34 -0700 Subject: [PATCH 4/7] pwsh fix --- eng/scripts/CodeChecks.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/scripts/CodeChecks.ps1 b/eng/scripts/CodeChecks.ps1 index 8cc54bdedf600..d9cf2bb05cb09 100644 --- a/eng/scripts/CodeChecks.ps1 +++ b/eng/scripts/CodeChecks.ps1 @@ -44,7 +44,7 @@ try { & dotnet msbuild -version } - Write-Host "Checking that solutions are up to date" + Write-Host "Checking that solutions are up to date" Join-Path "$PSScriptRoot/../../sdk" $ServiceDirectory ` | Resolve-Path ` | % { Get-ChildItem $_ -Filter "Azure.*.sln" -Recurse } ` @@ -65,7 +65,7 @@ try { Write-Host "Validating sample readmes" $root = "$PSScriptRoot/../../sdk/$ServiceDirectory" foreach ($projectDirName in Get-ChildItem -Recurse -Directory $root -Filter "Azure.*"){ - $sampleReadmePath = $root + '/' + $projectDirName + '/samples/README.md'; + $sampleReadmePath = "$projectDirName/samples/README.md" if (Test-Path $sampleReadmePath) { $content = Get-Content -Path $sampleReadmePath $matches = $content | Select-String -Pattern "(.md|.cs)\)" From 2b14935822142bfc9b0255b75d4482eac9c87647 Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Fri, 5 Jun 2020 18:26:33 -0700 Subject: [PATCH 5/7] Fix tab --- eng/scripts/CodeChecks.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/scripts/CodeChecks.ps1 b/eng/scripts/CodeChecks.ps1 index d9cf2bb05cb09..a8709f4df8c7d 100644 --- a/eng/scripts/CodeChecks.ps1 +++ b/eng/scripts/CodeChecks.ps1 @@ -44,7 +44,7 @@ try { & dotnet msbuild -version } - Write-Host "Checking that solutions are up to date" + Write-Host "Checking that solutions are up to date" Join-Path "$PSScriptRoot/../../sdk" $ServiceDirectory ` | Resolve-Path ` | % { Get-ChildItem $_ -Filter "Azure.*.sln" -Recurse } ` From ceaf62b9c9ec0f793c76067ad1285c5ecb4abc78 Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Fri, 5 Jun 2020 23:16:05 -0700 Subject: [PATCH 6/7] Update sample readmes --- .../Azure.Data.AppConfiguration/samples/README.md | 14 +++++++------- sdk/core/Azure.Core/samples/README.md | 10 +++++----- .../samples/README.md | 8 ++++---- .../Azure.Messaging.EventHubs/samples/README.md | 6 +++--- .../samples/README.md | 4 ++-- .../Azure.Security.KeyVault.Keys/samples/README.md | 12 ++++++------ .../samples/README.md | 6 +++--- .../Azure.Search.Documents/samples/README.md | 6 +++--- .../Azure.Storage.Blobs.Batch/samples/README.md | 2 +- sdk/storage/Azure.Storage.Blobs/samples/README.md | 6 +++--- sdk/storage/Azure.Storage.Common/samples/README.md | 2 +- .../Azure.Storage.Files.DataLake/samples/README.md | 4 ++-- .../Azure.Storage.Files.Shares/samples/README.md | 4 ++-- sdk/storage/Azure.Storage.Queues/samples/README.md | 4 ++-- 14 files changed, 44 insertions(+), 44 deletions(-) diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/README.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/README.md index e202d56221171..ebd19c78dfac7 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/README.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/README.md @@ -11,10 +11,10 @@ description: Samples for the Azure.Data.AppConfiguration client library # Azure App Configuration client SDK samples - - [Create, Retrieve and Delete a Configuration Setting](Sample1_HelloWorld.md) - - [Asynchronously Create, Update and Delete Configuration Setting With Labels](Sample2_HelloWorldExtended.md) - - [Make a Configuration Setting Read-Only](Sample3_SetClearReadOnly.md) - - [Read Revision History](Sample4_ReadRevisionHistory.md) - - [Get a Configuration Setting](Sample5_GetSettingIfChanged.md) - - [Update a Configuration If Unchanged](Sample6_UpdateSettingIfUnchanged.md) - - [Mock a client for testing using the Moq library](Sample7_MockClient.md) + - [Create, Retrieve and Delete a Configuration Setting](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample1_HelloWorld.md) + - [Asynchronously Create, Update and Delete Configuration Setting With Labels](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample2_HelloWorldExtended.md) + - [Make a Configuration Setting Read-Only](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample3_SetClearReadOnly.md) + - [Read Revision History](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample4_ReadRevisionHistory.md) + - [Get a Configuration Setting](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample5_GetSettingIfChanged.md) + - [Update a Configuration If Unchanged](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample6_UpdateSettingIfUnchanged.md) + - [Mock a client for testing using the Moq library](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample7_MockClient.md) diff --git a/sdk/core/Azure.Core/samples/README.md b/sdk/core/Azure.Core/samples/README.md index 637d013f747d8..a4f764b3878ee 100644 --- a/sdk/core/Azure.Core/samples/README.md +++ b/sdk/core/Azure.Core/samples/README.md @@ -10,8 +10,8 @@ description: Samples for the Azure.Core client library # Azure.Core Samples -- [Configuration](Configuration.md) -- [Response](Response.md) -- [Pipeline](Pipeline.md) -- [Long Running Operations](LongRunningOperations.md) -- [Mocking](Mocking.md) +- [Configuration](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/samples/Configuration.md) +- [Response](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/samples/Response.md) +- [Pipeline](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/samples/Pipeline.md) +- [Long Running Operations](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/samples/LongRunningOperations.md) +- [Mocking](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/samples/Mocking.md) diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/README.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/README.md index 3db49e0f7f1c5..9c5f47b46111d 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/README.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/README.md @@ -11,7 +11,7 @@ description: Samples for the Azure.Messaging.EventHubs.Processor client library # Azure.Messaging.EventHubs.Processor Samples -The Azure Event Hubs Processor samples are intended to serve as an example and introduction to common scenarios in which the Event Hubs Processor client library is used, and to help demonstrate library features. The samples are accompanied by a [console application](./Program.cs) which you can use to execute and debug them interactively. The simplest way to begin is to launch the project for debugging in Visual Studio or your preferred IDE and provide the Event Hubs connection information in response to the prompts. +The Azure Event Hubs Processor samples are intended to serve as an example and introduction to common scenarios in which the Event Hubs Processor client library is used, and to help demonstrate library features. The samples are accompanied by a [console application](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Program.cs) which you can use to execute and debug them interactively. The simplest way to begin is to launch the project for debugging in Visual Studio or your preferred IDE and provide the Event Hubs connection information in response to the prompts. Each of the samples is self-contained and focused on illustrating one specific scenario. Each is numbered, with the lower numbers concentrating on basic scenarios and building to more complex scenarios as they increase; though each sample is independent, it will assume an understanding of the content discussed in earlier samples. @@ -73,6 +73,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. -Please see our [contributing guide](./../Azure.Messaging.EventHubs/CONTRIBUTING.md) for more information. - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net%2Fsdk%2Feventhub%2FAzure.Messaging.EventHubs.Processor/samples/%2FREADME.png) \ No newline at end of file +Please see our [contributing guide](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/eventhub/Azure.Messaging.EventHubs/CONTRIBUTING.md) for more information. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net%2Fsdk%2Feventhub%2FAzure.Messaging.EventHubs.Processor/samples/%2FREADME.png) diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/samples/README.md b/sdk/eventhub/Azure.Messaging.EventHubs/samples/README.md index 22d2e6d08a459..4ebe20b569d37 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs/samples/README.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/samples/README.md @@ -1,4 +1,4 @@ ---- +--- page_type: sample languages: - csharp @@ -11,7 +11,7 @@ description: Samples for the Azure.Messaging.EventHubs client library # Azure.Messaging.EventHubs Samples -The Azure Event Hubs samples are intended to serve as an example and introduction to common scenarios in which the Event Hubs client library is used, and to help demonstrate library features. The samples are accompanied by a [console application](./Program.cs) which you can use to execute and debug them interactively. The simplest way to begin is to launch the project for debugging in Visual Studio or your preferred IDE and provide the Event Hubs connection information in response to the prompts. +The Azure Event Hubs samples are intended to serve as an example and introduction to common scenarios in which the Event Hubs client library is used, and to help demonstrate library features. The samples are accompanied by a [console application](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/eventhub/Azure.Messaging.EventHubs/samples/Program.cs) which you can use to execute and debug them interactively. The simplest way to begin is to launch the project for debugging in Visual Studio or your preferred IDE and provide the Event Hubs connection information in response to the prompts. Each of the samples is self-contained and focused on illustrating one specific scenario. Each is numbered, with the lower numbers concentrating on basic scenarios and building to more complex scenarios as they increase; though each sample is independent, it will assume an understanding of the content discussed in earlier samples. @@ -79,6 +79,6 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. -Please see our [contributing guide](./CONTRIBUTING.md) for more information. +Please see our [contributing guide](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/eventhub/Azure.Messaging.EventHubs/samples/CONTRIBUTING.md) for more information. ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net%2Fsdk%2Feventhub%2FAzure.Messaging.EventHubs/samples/%2FREADME.png) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/README.md b/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/README.md index f2366d13ad0d7..5686aca4f458a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/README.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/README.md @@ -11,5 +11,5 @@ description: Samples for the Azure.Security.KeyVault.Certificates client library # Azure.Security.KeyVault.Certificates Samples -- [Setting, getting, updating, and deleting certificates](Sample1_HelloWorld.md) -- [Listing certificates, certificate versions, and deleted certificates](Sample2_GetCertificates.md) +- [Setting, getting, updating, and deleting certificates](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample1_HelloWorld.md) +- [Listing certificates, certificate versions, and deleted certificates](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample2_GetCertificates.md) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/README.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/README.md index 8f3f2645adf43..901548de1eb14 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/README.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/README.md @@ -11,9 +11,9 @@ description: Samples for the Azure.Security.KeyVault.Keys client library. # Azure.Security.KeyVault.Keys Samples -- [Creating, getting, updating, and deleting keys](Sample1_HelloWorld.md) -- [Back up and restore a key](Sample2_BackupAndRestore.md) -- [Listing keys, key versions, and deleted keys](Sample3_GetKeys.md) -- [Encrypting and decrypt keys](Sample4_EncryptDecrypt.md) -- [Signing and verifying keys](Sample5_SignVerify.md) -- [Wrapping and unwrap a key](Sample6_WrapUnwrap.md) +- [Creating, getting, updating, and deleting keys](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md) +- [Back up and restore a key](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample2_BackupAndRestore.md) +- [Listing keys, key versions, and deleted keys](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample3_GetKeys.md) +- [Encrypting and decrypt keys](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample4_EncryptDecrypt.md) +- [Signing and verifying keys](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample5_SignVerify.md) +- [Wrapping and unwrap a key](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample6_WrapUnwrap.md) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/README.md b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/README.md index ee3787aedf906..99eeb1dfe39c9 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/README.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/README.md @@ -11,6 +11,6 @@ description: Samples for the Azure.Security.KeyVault.Secrets client library. # Azure.Security.KeyVault.Secrets Samples -- [Creating, getting, updating, and deleting secrets](Sample1_HelloWorld.md) -- [Back up and restore a secret](Sample2_BackupAndRestore.md) -- [Listing secrets, secret versions, and deleted secrets](Sample3_GetSecrets.md) +- [Creating, getting, updating, and deleting secrets](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample1_HelloWorld.md) +- [Back up and restore a secret](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample2_BackupAndRestore.md) +- [Listing secrets, secret versions, and deleted secrets](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample3_GetSecrets.md) diff --git a/sdk/search/Azure.Search.Documents/samples/README.md b/sdk/search/Azure.Search.Documents/samples/README.md index 74173d868c672..958f189b8dcda 100644 --- a/sdk/search/Azure.Search.Documents/samples/README.md +++ b/sdk/search/Azure.Search.Documents/samples/README.md @@ -11,6 +11,6 @@ description: Samples for the Azure.Search.Documents client library # Azure.Search.Documents Samples -- Get started either [synchronously](Sample01a_HelloWorld.md) or [asynchronously](Sample01b_HelloWorldAsync.md). -- Perform [service level operations](Sample02_Service.md). -- Perform [index level operations](Sample03_Index.md). +- Get started either [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample01a_HelloWorld.md) or [asynchronously](Sample01b_HelloWorldAsync.md). +- Perform [service level operations](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample02_Service.md). +- Perform [index level operations](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample03_Index.md). diff --git a/sdk/storage/Azure.Storage.Blobs.Batch/samples/README.md b/sdk/storage/Azure.Storage.Blobs.Batch/samples/README.md index 3f1b20c55227f..a6201e1fca50a 100644 --- a/sdk/storage/Azure.Storage.Blobs.Batch/samples/README.md +++ b/sdk/storage/Azure.Storage.Blobs.Batch/samples/README.md @@ -11,4 +11,4 @@ description: Samples for the Azure.Storage.Blobs.Batch client library # Azure.Storage.Blobs.Batch Samples -- Delete or set access tiers in batches [synchronously](Sample03a_Batching.cs) or [asynchronously](Sample03b_BatchingAsync.cs). +- Delete or set access tiers in batches [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs.Batch/samples/Sample03a_Batching.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs.Batch/samples/Sample03b_BatchingAsync.cs). diff --git a/sdk/storage/Azure.Storage.Blobs/samples/README.md b/sdk/storage/Azure.Storage.Blobs/samples/README.md index 0f28f11ba2d3c..a8537adca1e0d 100644 --- a/sdk/storage/Azure.Storage.Blobs/samples/README.md +++ b/sdk/storage/Azure.Storage.Blobs/samples/README.md @@ -11,6 +11,6 @@ description: Samples for the Azure.Storage.Blobs client library # Azure.Storage.Blobs Samples -- Upload, download, list blobs, and check for errors [synchronously](Sample01a_HelloWorld.cs) or [asynchronously](Sample01b_HelloWorldAsync.cs). -- [Authenticate with connection strings, public access, shared keys, shared access signatures, and Azure Active Directory.](Sample02_Auth.cs) -- Delete or set access tiers in batches [synchronously](Sample03a_Batching.cs) or [asynchronously](Sample03b_BatchingAsync.cs). +- Upload, download, list blobs, and check for errors [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample01a_HelloWorld.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample01b_HelloWorldAsync.cs). +- [Authenticate with connection strings, public access, shared keys, shared access signatures, and Azure Active Directory.](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs) +- Delete or set access tiers in batches [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs.Batch/samples/Sample03a_Batching.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs.Batch/samples/Sample03b_BatchingAsync.cs). diff --git a/sdk/storage/Azure.Storage.Common/samples/README.md b/sdk/storage/Azure.Storage.Common/samples/README.md index 0aaa35569f499..c08b8adf26fc9 100644 --- a/sdk/storage/Azure.Storage.Common/samples/README.md +++ b/sdk/storage/Azure.Storage.Common/samples/README.md @@ -11,4 +11,4 @@ description: Samples for the Azure.Storage.Common client library # Azure.Storage.Common Samples -- [Configure Retries](Sample01a_HelloWorld.cs) +- [Configure Retries](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Common/samples/Sample01a_HelloWorld.cs) diff --git a/sdk/storage/Azure.Storage.Files.DataLake/samples/README.md b/sdk/storage/Azure.Storage.Files.DataLake/samples/README.md index fa40157c8ea82..1aee62c0c842b 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/samples/README.md +++ b/sdk/storage/Azure.Storage.Files.DataLake/samples/README.md @@ -12,5 +12,5 @@ description: Samples for the Azure.Storage.Files.DataLake client library # Azure.Storage.Files.DataLake Samples -- Create and manipulate file systems, directories, and files [synchronously](Sample01a_HelloWorld.cs) or [asynchronously](Sample01b_HelloWorldAsync.cs). -- [Authenticate with public access, shared keys, shared access signatures, and Azure Active Directory.](Sample02_Auth.cs) +- Create and manipulate file systems, directories, and files [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample01a_HelloWorld.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample01b_HelloWorldAsync.cs). +- [Authenticate with public access, shared keys, shared access signatures, and Azure Active Directory.](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample02_Auth.cs) diff --git a/sdk/storage/Azure.Storage.Files.Shares/samples/README.md b/sdk/storage/Azure.Storage.Files.Shares/samples/README.md index f3a65c9591e46..d29c3d60cbdef 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/samples/README.md +++ b/sdk/storage/Azure.Storage.Files.Shares/samples/README.md @@ -11,5 +11,5 @@ description: Samples for the Azure.Storage.Files.Shares client library # Azure.Storage.Files.Shares Samples -- Create, upload, download, and traverse file shares [synchronously](Sample01a_HelloWorld.cs) or [asynchronously](Sample01b_HelloWorldAsync.cs). -- [Authenticate with connection strings, shared keys, and shared access signatures.](Sample02_Auth.cs) +- Create, upload, download, and traverse file shares [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Files.Shares/samples/Sample01a_HelloWorld.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Files.Shares/samples/Sample01b_HelloWorldAsync.cs). +- [Authenticate with connection strings, shared keys, and shared access signatures.](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Files.Shares/samples/Sample02_Auth.cs) diff --git a/sdk/storage/Azure.Storage.Queues/samples/README.md b/sdk/storage/Azure.Storage.Queues/samples/README.md index df9aba6f8b4e8..6c0269c2c1cbf 100644 --- a/sdk/storage/Azure.Storage.Queues/samples/README.md +++ b/sdk/storage/Azure.Storage.Queues/samples/README.md @@ -11,5 +11,5 @@ description: Samples for the Azure.Storage.Queues client library # Azure.Storage.Queues Samples -- Create and interact with queues by sending and receiving messages [synchronously](Sample01a_HelloWorld.cs) or [asynchronously](Sample01b_HelloWorldAsync.cs). -- [Authenticate with connection strings, shared keys, shared access signatures, and Azure Active Directory.](Sample02_Auth.cs) +- Create and interact with queues by sending and receiving messages [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Queues/samples/Sample01a_HelloWorld.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Queues/samples/Sample01b_HelloWorldAsync.cs). +- [Authenticate with connection strings, shared keys, shared access signatures, and Azure Active Directory.](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Queues/samples/Sample02_Auth.cs) From 59e7809e1c40e149b467da0341da5c434c469c0c Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Sat, 6 Jun 2020 13:41:24 -0700 Subject: [PATCH 7/7] Revert codechecks changes; update Search readme --- eng/scripts/CodeChecks.ps1 | 16 ---------------- .../Azure.Search.Documents/samples/README.md | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/eng/scripts/CodeChecks.ps1 b/eng/scripts/CodeChecks.ps1 index a8709f4df8c7d..59eb978d89b1f 100644 --- a/eng/scripts/CodeChecks.ps1 +++ b/eng/scripts/CodeChecks.ps1 @@ -62,22 +62,6 @@ try { } } - Write-Host "Validating sample readmes" - $root = "$PSScriptRoot/../../sdk/$ServiceDirectory" - foreach ($projectDirName in Get-ChildItem -Recurse -Directory $root -Filter "Azure.*"){ - $sampleReadmePath = "$projectDirName/samples/README.md" - if (Test-Path $sampleReadmePath) { - $content = Get-Content -Path $sampleReadmePath - $matches = $content | Select-String -Pattern "(.md|.cs)\)" - foreach ($match in $matches){ - $relLink = $match | Select-String -NotMatch "\(http" - if ($relLink){ - LogError "Absolute links to GitHub should be used in the samples readme file: $sampleReadmePath, link: $relLink" - } - } - } - } - Write-Host "Re-generating readmes" Invoke-Block { & $PSScriptRoot\Update-Snippets.ps1 @script:PSBoundParameters diff --git a/sdk/search/Azure.Search.Documents/samples/README.md b/sdk/search/Azure.Search.Documents/samples/README.md index 958f189b8dcda..032c51804a33d 100644 --- a/sdk/search/Azure.Search.Documents/samples/README.md +++ b/sdk/search/Azure.Search.Documents/samples/README.md @@ -11,6 +11,6 @@ description: Samples for the Azure.Search.Documents client library # Azure.Search.Documents Samples -- Get started either [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample01a_HelloWorld.md) or [asynchronously](Sample01b_HelloWorldAsync.md). +- Get started either [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample01a_HelloWorld.md) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample01b_HelloWorldAsync.md). - Perform [service level operations](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample02_Service.md). - Perform [index level operations](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample03_Index.md).