Skip to content
Closed
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
3 changes: 3 additions & 0 deletions .azure-pipelines/util/analyze-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ steps:

- pwsh: 'Install-Module "platyPS", "PSScriptAnalyzer" -Force -Confirm:$false -Scope CurrentUser'
displayName: 'Install PowerShell Dependencies'

- pwsh: 'New-Item -ItemType Directory -Path "Az-Cmdlets-latest"; Invoke-WebRequest -Uri "https://azpspackage.blob.core.windows.net/release/Az-Cmdlets-latest.tar.gz" -OutFile "Az-Cmdlets-latest/Az-Cmdlets-latest.tar.gz"; tar -xvzf "Az-Cmdlets-latest/Az-Cmdlets-latest.tar.gz" -C "Az-Cmdlets-latest"; . Az-Cmdlets-latest/InstallModule.ps1'
displayName: 'Install latest modules'

- task: DotNetCoreCLI@2
displayName: 'Generate Help'
Expand Down
2 changes: 1 addition & 1 deletion .ci-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"src/{ModuleName}/**/*.md$"
],
"phases": [
"build:related-module",
"build:module",
"help:module"
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/Compute/Compute/help/Remove-AzRestorePoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.Azure.PowerShell.Cmdlets.Compute.dll-Help.xml
Module Name: Az.Compute
online version: https://docs.microsoft.com/powershell/module/az.compute/remove-azrestorepoint
schema: 2.0.0
---
---

# Remove-AzRestorePoint

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Module Name: Az.Compute
ms.assetid: 6BCB36BC-F5E6-4EDD-983C-8BDE7A9B004D
online version: https://docs.microsoft.com/powershell/module/az.compute/set-azvmdiskencryptionextension
schema: 2.0.0
---
---

# Set-AzVMDiskEncryptionExtension

Expand Down
4 changes: 2 additions & 2 deletions src/Compute/Compute/help/Update-AzRestorePointCollection.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.Azure.PowerShell.Cmdlets.Compute.dll-Help.xml
Module Name: Az.Compute
online version: https://docs.microsoft.com/powershell/module/az.compute/update-azrestorepointcollection
schema: 2.0.0
---
---

# Update-AzRestorePointCollection

Expand All @@ -24,7 +24,7 @@ Update Restore Point Collection. Can only Update Tags

### Example 1
```powershell
Update-AzRestorePointCollection -ResourceGroupName <String> -Name <String> [-Tag] <Hashtable> -Confirm
Update-AzRestorePointCollection -ResourceGroupName <String> -Name <String> -Tag <Hashtable> -Confirm
```

Add updated tags using -Tag parameter
Expand Down
10 changes: 10 additions & 0 deletions src/Synapse/Synapse/help/New-AzSynapseManagedPrivateEndpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ The **New-AzSynapseManagedPrivateEndpoint** cmdlet creates or updates a managed

### Example 1
```powershell
<#
endpoint.json
{
"name": "ContosoManagedPrivateEndpoint",
"properties": {
"privateLinkResourceId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/contosoResourceGroup/providers/Microsoft.Storage/storageAccounts/contosoStorageAccount",
"groupId": "file"
}
}
#>
New-AzSynapseManagedPrivateEndpoint -WorkspaceName ContosoWorkspace -Name ContosoManagedPrivateEndpoint -DefinitionFile "C:\\endpoint.json"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,17 @@ function Measure-ParameterNameAndValue {
if ($null -eq $NextCommandElement -or $NextCommandElement -is [System.Management.Automation.Language.CommandParameterAst]) {
# Parameter is not assigned with a value.
# Unassigned_Parameter
$global:CommandParameterPair += @{
# Exclude parameters assigned by <Type>, and analyze the next item.
if($CommandElementAst.Parent.Extent.Text -match "-$ParameterName\s*<[!<>]+>"){
$global:SkipNextCommandElementAst = $true
}
else{
$global:CommandParameterPair += @{
CommandName = $CommandName
ParameterName = $ParameterName
ExpressionToParameter = $null
ModuleCmdletExNum = $ModuleCmdletExNum
}
}
return $true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if ($PSCmdlet.ParameterSetName -eq "Markdown") {
if ($PSCmdlet.ParameterSetName -eq "Script" -or $AnalyzeScriptsInFile.IsPresent) {
# Read and analyze ".ps1" in \ScriptsByExample
Write-Output "Analyzing file ..."
$analysisResultsTable += Get-ScriptAnalyzerResult (Get-Item -Path $ScriptPaths) $RulePaths -IncludeDefaultRules:$IncludeDefaultRules.IsPresent -ErrorAction SilentlyContinue
$analysisResultsTable += Get-ScriptAnalyzerResult (Get-Item -Path $ScriptPaths) $RulePaths -IncludeDefaultRules:$IncludeDefaultRules.IsPresent -ErrorAction Continue

# Summarize analysis results, output in Result.csv
if($analysisResultsTable){
Expand Down
4 changes: 3 additions & 1 deletion tools/StaticAnalysis/IssueChecker/IssueChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private bool IsSingleExceptionFileHasCriticalIssue(string exceptionFilePath, str
}
var errorText = new StringBuilder();
errorText.AppendLine(recordList.First().PrintHeaders());
var warningText = new StringBuilder();
foreach (IReportRecord record in recordList)
{
if (record.Severity < 2)
Expand All @@ -117,13 +118,14 @@ private bool IsSingleExceptionFileHasCriticalIssue(string exceptionFilePath, str
}
else if (record.Severity == 2 && outputWarning)
{
errorText.AppendLine(record.FormatRecord());
warningText.AppendLine(record.FormatRecord());
}
}
if (hasError)
{
Console.WriteLine("{0} Errors", exceptionFilePath);
Console.WriteLine(errorText.ToString());
Console.WriteLine(warningText.ToString());
}
}
return hasError;
Expand Down