Skip to content

Commit 0e03ba6

Browse files
author
Maddie Clayton
authored
Merge pull request #6446 from cormacpayne/fix-build
Fix bugs in StaticAnalysis and change log check script
2 parents 98667af + 2424c58 commit 0e03ba6

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

tools/CheckChangeLog.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ foreach ($File in $FilesChangedList)
5252
}
5353

5454
# If a file in src/Common is updated, check for change log entry in Profile
55-
if ($File.StartsWith("src/Common") -and ($UpdatedServicePaths | where { $_ -like "*Profile*" } | Measure-Object).Count -gt 0)
55+
if (($File.StartsWith("src/Common") -or $File.StartsWith("src/ResourceManager/Common")) -and ($UpdatedServicePaths | where { $_ -like "*Profile*" } | Measure-Object).Count -gt 0)
5656
{
5757
continue
5858
}

tools/StaticAnalysis/Exceptions/AzureRM.Compute/SignatureIssues.csv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,6 @@
122122
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption.SetAzureDiskEncryptionExtensionCommand","Set-AzureRmVMDiskEncryptionExtension","1","8420","Parameter set 'AADClientCertParameterSet' of cmdlet 'Set-AzureRmVMDiskEncryptionExtension' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer."
123123
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption.SetAzureVMBackupExtension","Set-AzureRmVMBackupExtension","1","8100","Set-AzureRmVMBackupExtension Does not support ShouldProcess but the cmdlet verb Set indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
124124
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.NewAzureVMDataDiskCommand","New-AzureRmVMDataDisk","1","8100","New-AzureRmVMDataDisk Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
125+
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.AddAzureVMDataDiskCommand","Add-AzureRmVMDataDisk","1","8420","Parameter set 'VmNormalDiskParameterSetName' of cmdlet 'Add-AzureRmVMDataDisk' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer."
126+
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.AddAzureVMDataDiskCommand","Add-AzureRmVMDataDisk","1","8420","Parameter set 'VmManagedDiskParameterSetName' of cmdlet 'Add-AzureRmVMDataDisk' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer."
127+
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.AddAzureVMDataDiskCommand","Add-AzureRmVMDataDisk","1","8420","Parameter set 'VmScaleSetVMParameterSetName' of cmdlet 'Add-AzureRmVMDataDisk' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer."

tools/StaticAnalysis/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private static void ConsolidateExceptionFiles(string exceptionsDirectory)
147147
var exceptionFilePath = Path.Combine(exceptionsDirectory, exceptionFileName);
148148
if (File.Exists(exceptionFilePath))
149149
{
150-
throw new IOException(string.Format("The file '{0}' already exists.", exceptionFilePath));
150+
File.Delete(exceptionFilePath);
151151
}
152152

153153
File.Create(exceptionFilePath).Close();

tools/StaticAnalysis/SignatureVerifier/SignatureIssue.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public bool Match(IReportRecord other)
4949
result = string.Equals(record.ClassName, ClassName, StringComparison.OrdinalIgnoreCase) &&
5050
string.Equals(record.Target, Target, StringComparison.OrdinalIgnoreCase) &&
5151
(record.ProblemId == ProblemId) &&
52-
record.Severity == Severity;
52+
(record.Severity == Severity) &&
53+
(record.Description == Description);
5354

5455
}
5556

0 commit comments

Comments
 (0)