Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
f24c629
add scriptAnalyzer
MoChilia May 30, 2022
4de10ef
test for change cs
MoChilia May 30, 2022
41e4d3d
test for change both .cs and .md
MoChilia May 30, 2022
7bc2b26
fix a bug: error when no changed file
MoChilia May 30, 2022
143ef53
fix output of result
MoChilia May 31, 2022
90dc8c7
test for wrong md
MoChilia May 31, 2022
7aaa1d4
Merge branch 'shiying/ci-example' into shiying/test-ci-example
MoChilia May 31, 2022
60420cf
fix import-module
MoChilia May 31, 2022
be403db
Merge branch 'shiying/test-ci-example' of https://github.com/Azure/az…
MoChilia May 31, 2022
05b8bac
sync up with shiying/ci-example
MoChilia May 31, 2022
44ea809
output by issueChecker
MoChilia May 31, 2022
a61081d
fix the bug for exceptionFilePath
MoChilia Jun 1, 2022
2eb38a3
Report errors according to the .csv
MoChilia Jun 1, 2022
955c5be
Test output of scriptAnalyzer
MoChilia Jun 1, 2022
919c760
test
MoChilia Jun 1, 2022
f3578f4
restore
MoChilia Jun 1, 2022
22d693a
fix bug for module name
MoChilia Jun 2, 2022
3ab5bbc
fix bug for module name
MoChilia Jun 2, 2022
e7b9b57
build dependent-module for md; complete csv; output in one ps1
MoChilia Jun 9, 2022
0257709
illustration for example issue; add suppress; change problemId
MoChilia Jun 9, 2022
f11dbd7
Update Program.cs
MoChilia Jun 10, 2022
21d5d3f
Update Measure-MarkdownOrScript.ps1
MoChilia Jun 10, 2022
90bbb75
Update Remove-AzApiManagement.md
MoChilia Jun 13, 2022
51bdd44
Update Add-AzApiManagementApiToGateway.md
MoChilia Jun 13, 2022
591c125
Update Add-AzVMDataDisk.md
MoChilia Jun 13, 2022
2497f03
Update Clear-AzConfig.md
MoChilia Jun 13, 2022
b452b08
Update Get-AzDefault.md
MoChilia Jun 13, 2022
1fd8a5c
Update Get-AzAlert.md
MoChilia Jun 13, 2022
daecd9f
Update Get-AzAlert.md
MoChilia Jun 13, 2022
fd4da5e
Update Invoke-AzRestMethod.md
MoChilia Jun 13, 2022
a216aea
Update Disable-AzContextAutosave.md
MoChilia Jun 13, 2022
042aeef
Update Invoke-AzRestMethod.md
MoChilia Jun 13, 2022
0e7ef0a
Update Connect-AzAccount.md
MoChilia Jun 13, 2022
ad843c3
Update Invoke-AzRestMethod.md
MoChilia Jun 15, 2022
83ebf73
Update Add-AzEnvironment.md
MoChilia Jun 15, 2022
b58a3b6
Update Invoke-AzRestMethod.md
MoChilia Jun 15, 2022
fe28e64
Update Invoke-AzRestMethod.md
MoChilia Jun 17, 2022
f65e467
Update Add-AzEnvironment.md
MoChilia Jun 17, 2022
c66ba3a
fix some bugs
MoChilia Jun 24, 2022
d6d222a
Delete tools/StaticAnalysis/ExampleAnalyzer directory
MoChilia Jun 26, 2022
ba5d879
Merge branch 'shiying/ci-example-fix-bug' into shiying/test-ci-example-2
MoChilia Jun 26, 2022
dbb0563
Delete ExampleIssues.csv
MoChilia Jun 27, 2022
83de1a1
Update New-AzConfidentialLedger.md
MoChilia Jun 29, 2022
0030594
Update Set-AzStorageFileContent.md
MoChilia Jun 29, 2022
0e575a2
Update Set-AzContext.md
MoChilia Jul 1, 2022
1283d2a
fix bug for mismatched parameter value type
MoChilia Jul 1, 2022
b610418
fix some bugs
MoChilia Jul 6, 2022
6da0f03
fix bugs
MoChilia Jul 6, 2022
7e31e61
Merge branch 'shiying/ci-example-1' into shiying/test-ci-example-2
MoChilia Jul 6, 2022
e37f727
abandon codeRegex
MoChilia Jul 7, 2022
8ffc647
fix prompt regex
MoChilia Jul 7, 2022
8900ace
Merge branch 'shiying/ci-example-ReExtractCode' into shiying/test-ci-…
MoChilia Jul 7, 2022
c334855
add skip tag to Add-AzEnvironment.md
MoChilia Jul 7, 2022
33f8f3e
Merge branch 'shiying/ci-example-recoverSeverity' into shiying/test-c…
MoChilia Jul 7, 2022
f4533ff
Update Enable-AzureRmAlias.md
MoChilia Jul 8, 2022
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
1 change: 0 additions & 1 deletion documentation/Debugging-StaticAnalysis-Errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Most help issues that cause StaticAnalysis to fail occur when help has not been

### Example Issues
Example issues occur when your changed markdown files in the `help` folder (_e.g.,_ `src/Accounts/Accounts/help`) violate PowerShell language best practices. Please follow the suggestion displayed in "Remediation" entry for each violation listed in `ExampleIssues.csv`. If you have an issue with severity 0 or 1 that has been approved by the Azure PowerShell team, you can suppress them following these steps:

- Download the `ExampleIssues.csv` file from the CI pipeline artifacts
- Open the file using a text editor (such as VS Code) and copy each of the errors you'd like to suppress
- Paste each of these errors into the `ExampleIssues.csv` file found in their respective [module folder](../tools/StaticAnalysis/Exceptions) (_e.g.,_ if an example issue is being suppressed for Accounts, then you would paste the corresponding line(s) in the `tools/StaticAnalysis/Exceptions/Az.Accounts/ExampleIssue.csv` file) using the same text editor
Expand Down
9 changes: 8 additions & 1 deletion src/Accounts/Accounts/help/Add-AzEnvironment.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml
Module Name: Az.Accounts
online version: https://docs.microsoft.com/powershell/module/az.accounts/add-azenvironment
schema: 2.0.0
---
---

# Add-AzEnvironment

Expand Down Expand Up @@ -58,6 +58,7 @@ The built-in environments AzureCloud and AzureChinaCloud target existing public
## EXAMPLES

### Example 1: Creating and modifying a new environment
<!-- Skip: Output cannot be splitted from code -->
```powershell
Add-AzEnvironment -Name TestEnvironment `
-ActiveDirectoryEndpoint TestADEndpoint `
Expand Down Expand Up @@ -160,6 +161,12 @@ TestEnvironment TestRMEndpoint TestADEndpoint/

In this example, we are discovering a new Azure environment from the `https://configuredmetadata.net` Uri.


### Example 3: Test
```powershell
PS C:\>Add-AzEnvironment -Name Test
```

## PARAMETERS

### -ActiveDirectoryEndpoint
Expand Down
1 change: 1 addition & 0 deletions src/Accounts/Accounts/help/Clear-AzConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Clears the values of configs that are set by the user. By default all the config

### Example 1
```powershell
$null = gal
Clear-AzConfig -Force
```

Expand Down
2 changes: 1 addition & 1 deletion src/Accounts/Accounts/help/Connect-AzAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml
Module Name: Az.Accounts
online version: https://docs.microsoft.com/powershell/module/az.accounts/connect-azaccount
schema: 2.0.0
---
---

# Connect-AzAccount

Expand Down
2 changes: 1 addition & 1 deletion src/Accounts/Accounts/help/Disable-AzContextAutosave.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml
Module Name: Az.Accounts
online version: https://docs.microsoft.com/powershell/module/az.accounts/disable-azcontextautosave
schema: 2.0.0
---
---

# Disable-AzContextAutosave

Expand Down
2 changes: 1 addition & 1 deletion src/Accounts/Accounts/help/Enable-AzureRmAlias.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml
Module Name: Az.Accounts
online version: https://docs.microsoft.com/powershell/module/az.accounts/enable-azurermalias
schema: 2.0.0
---
---

# Enable-AzureRmAlias

Expand Down
2 changes: 1 addition & 1 deletion src/Accounts/Accounts/help/Get-AzDefault.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ user has set as default in the current context.

### Example 1
```powershell
Get-AzDefault
get-aZdeFault
```

```Output
Expand Down
20 changes: 19 additions & 1 deletion src/Accounts/Accounts/help/Invoke-AzRestMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml
Module Name: Az.Accounts
online version: https://docs.microsoft.com/powershell/module/az.accounts/invoke-azrestmethod
schema: 2.0.0
---
---

# Invoke-AzRestMethod

Expand Down Expand Up @@ -98,6 +98,24 @@ Content : {"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users

Get current signed in user via MicrosoftGraph API. This example is equivalent to `Get-AzADUser -SignedIn`.

### Example 3
```powershell
Invoke-AzRestMethod -Name "test" -Path "/subscriptions/{subscription}/resourcegroups/{resourcegroup}/providers/microsoft.operationalinsights/workspaces/{workspace}?api-version={API}"
```

```output
{{Add Output Here}}
```

### Example 4
```powershell
```

### Example 5
```powershell
Invoke-AzRestMethod "test" -Path "/subscriptions/{subscription}/resourcegroups/{resourcegroup}/providers/microsoft.operationalinsights/workspaces/{workspace}?api-version={API}"
```

## PARAMETERS

### -ApiVersion
Expand Down
2 changes: 1 addition & 1 deletion src/Accounts/Accounts/help/Set-AzContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml
Module Name: Az.Accounts
online version: https://docs.microsoft.com/powershell/module/az.accounts/set-azcontext
schema: 2.0.0
---
---

# Set-AzContext

Expand Down
11 changes: 8 additions & 3 deletions src/AlertsManagement/AlertsManagement/help/Get-AzAlert.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,16 @@ Get Alert details by Id (GUID) or Resource Id (Complete ARM Id)

### Example 3

Get Alerts Information. (autogenerated)
Get Alerts Information.

<!-- Aladdin Generated Example -->
```powershell
Get-AzAlert -IncludeContext $true -TimeRange '1h'
Get-AzAlert -IncludeContext $true -TimeRange '1h' -TimeRange '2h'
```

### Example 4

```powershell
Get-AzAlert -IncludeContext $true -PageCount {} -TimeRange '1h'
```

## PARAMETERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ Add-AzApiManagementApiToGateway -Context $ApiMgmtContext -GatewayId "0123456789"

This command adds the specified API to the specified Gateway.


### Example 2
```powershell
Add-AzApiManagementApiToGateway -Context $ApiMgmtContext -GatewayId "0123456789" -ApiId "0001"
```

### Example 3
```powershell
Add-AzApiManagementApiToGateway -Context -GatewayId "0123456789" -ApiId "0001"
```

## PARAMETERS

### -ApiId
Expand Down Expand Up @@ -181,4 +192,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## RELATED LINKS

[Remove-AzApiManagementApiFromGateway](./Remove-AzApiManagementApiFromGateway.md)
[Remove-AzApiManagementApiFromGateway](./Remove-AzApiManagementApiFromGateway.md)
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The **Remove-AzApiManagement** cmdlet removes an Azure API Management service.

### Example 1: Remove an API Management service
```powershell
Remove-AzApiManagement -ResourceGroupName "ContosoGroup02" -Name "ContosoApi"
Remove-AzApiManagement -ResourceGroupName "ContosoGroup02" -Name "ContosoApi" -Test
```

This command removes the API Management service named ContosoApi.
Expand Down
2 changes: 1 addition & 1 deletion src/Compute/Compute/help/Add-AzVMDataDisk.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $VirtualMachine = New-AzVMConfig -VMName "VirtualMachine07" -VMSize "Standard_A1
$DataDiskVhdUri01 = "https://contoso.blob.core.windows.net/test/data1.vhd"
$DataDiskVhdUri02 = "https://contoso.blob.core.windows.net/test/data2.vhd"
$DataDiskVhdUri03 = "https://contoso.blob.core.windows.net/test/data3.vhd"
$VirtualMachine = Add-AzVMDataDisk -VM $VirtualMachine -Name 'DataDisk1' -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 0 -VhdUri $DataDiskVhdUri01 -CreateOption Empty
$VirtualMachine = Add-AzVMDataDisk $VirtualMachine 'DataDisk1' -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 0 -VhdUri $DataDiskVhdUri01 -CreateOption Empty
$VirtualMachine = Add-AzVMDataDisk -VM $VirtualMachine -Name 'DataDisk2' -Caching 'ReadOnly' -DiskSizeInGB 11 -Lun 1 -VhdUri $DataDiskVhdUri02 -CreateOption Empty
$VirtualMachine = Add-AzVMDataDisk -VM $VirtualMachine -Name 'DataDisk3' -Caching 'ReadOnly' -DiskSizeInGB 12 -Lun 2 -VhdUri $DataDiskVhdUri03 -CreateOption Empty
```
Expand Down
2 changes: 1 addition & 1 deletion src/ConfidentialLedger/help/New-AzConfidentialLedger.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file:
Module Name: Az.ConfidentialLedger
online version: https://docs.microsoft.com/powershell/module/az.confidentialledger/new-azconfidentialledger
schema: 2.0.0
---
---

# New-AzConfidentialLedger

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Module Name: Az.Storage
ms.assetid: FA98E64B-D589-4653-9ACC-86573FAF4550
online version: https://docs.microsoft.com/powershell/module/az.storage/set-azstoragefilecontent
schema: 2.0.0
---
---

# Set-AzStorageFileContent

Expand Down
2 changes: 1 addition & 1 deletion tools/StaticAnalysis/ExampleAnalyzer/utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ function Measure-SectionMissingAndOutputScript {
}
$results += $result
}
{($exampleDetails.OutputBlocks.Count -ne 0 -and $exampleDetails.Outputs.Count -eq 0) -or $_missingExampleOutput -ne 0} {
{$exampleDetails.Outputs.Count -eq 0 -or $_missingExampleOutput -ne 0} {
$missingExampleOutput++
$result = [AnalysisOutput]@{
Module = $Module
Expand Down